forked from KatsOide/SAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
118 lines (96 loc) · 2.68 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# makefile for SAD1
# rewritten by A. Morita Apr. 16, 2002
#
SHELL=/bin/sh
all:
ifndef YACC
YACC=yacc
endif
ifndef OS_NAME
VPATH=src
MAKE_ENV=\
SADDIR=\`pwd\` \
\`./bin/HostArch -config\`
all_object lib exe all:
clean distclean mostlyclean depend patch debug sharedclean \
all_object lib exe doc all \
tcltk-patch tcltk-build tcltk \
libtai-patch libtai-build libtai \
install-exe install-pkg install-doc install-example install:
@$(SHELL) -c "$(MAKE) $@ $(MAKE_ENV)"
update_timezone: ./bin/gen_timezone_table
@rm -f src/timezone_table.h
@./bin/gen_timezone_table >src/timezone_table.h
update_calc_y: src/calc.h src/calc.c
src/calc.h src/calc.c: calc.y
$(YACC) -d -o src/calc.c $<
.f.o: $(@:.o=.f)
@$(SHELL) -c "$(MAKE) $@ $(MAKE_ENV)"
.c.o: $(@:.o=.f)
@$(SHELL) -c "$(MAKE) $@ $(MAKE_ENV)"
else
SADMK=$(SADDIR)/mk
SRCDIR=$(SADDIR)/src
SADCONF=$(SADDIR)/config
OBJDIR=$(SADDIR)/obj/${MACH_ARCH}
VPATH=$(SRCDIR)
$(OBJDIR)/Makefile: $(SADMK)/Makefile
@mkdir -p $(OBJDIR)/inc $(OBJDIR)/sim $(OBJDIR)/gdtoa
@cp $(SADMK)/Makefile $(OBJDIR)/Makefile
$(OBJDIR)/config.mk:
@./bin/HostArch -config > $(OBJDIR)/config.mk
@echo "SADDIR=$(SADDIR)" >> $(OBJDIR)/config.mk
ifdef CONF_FILE
@echo "CONF_FILE=$(CONF_FILE)" >> $(OBJDIR)/config.mk
endif
clean distclean mostlyclean depend patch debug \
all_object lib exe doc all \
tcltk-patch tcltk-build tcltk \
libtai-patch libtai-build libtai \
install-exe install-pkg install-doc install-example install: \
$(OBJDIR)/Makefile $(OBJDIR)/config.mk
@(cd $(OBJDIR); $(MAKE) $@)
.f.o: $(@:.o=.f) $(OBJDIR)/Makefile $(OBJDIR)/config.mk
@(cd $(OBJDIR); $(MAKE) $@)
.c.o: $(@:.o=.f) $(OBJDIR)/Makefile $(OBJDIR)/config.mk
@(cd $(OBJDIR); $(MAKE) $@)
endif
# target for extensions
MODULE_DIRS=extensions devel
modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) module); \
fi; \
done
depend-modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) depend); \
fi; \
done
install-modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) install); \
fi; \
done
clean-modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) clean); \
fi; \
done
distclean-modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) distclean); \
fi; \
done
mostlyclean-modules:
@for dir in $(MODULE_DIRS); do \
if [ -d $${dir} -a -f $${dir}/Makefile ]; then \
(cd $${dir}; $(MAKE) mostlyclean); \
fi; \
done
# End of File