-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmakefile
118 lines (116 loc) · 4.49 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 Linux, Mac, BSD, Cygwin, Solaris, etc. -*-Makefile-*-
include makefile.inc
all : setup.unx
cd kernel ; $(MAKE) -f makefile
cd class ; $(MAKE) -f makefile
cd threads ; $(MAKE) -f makefile
ifeq ($(CC),$(HCC)) # no need to make on cross-compile
cd dpp ; $(MAKE) -f makefile install
endif
cd generics ; $(MAKE) -f makefile
base : makegens
cd kernel ; $(MAKE) -f makefile
cd class ; $(MAKE) -f makefile
cd threads ; $(MAKE) -f makefile
cd generics ; $(MAKE) -f makefile
debug : setup.unx
cd kernel ; $(MAKE) -f makefile DEBUG=1
cd class ; $(MAKE) -f makefile DEBUG=1
cd threads ; $(MAKE) -f makefile DEBUG=1
ifeq ($(CC),$(HCC)) # no need to make on cross-compile
cd dpp ; $(MAKE) -f makefile DEBUG=1 install
endif
cd generics ; $(MAKE) -f makefile DEBUG=1
clean :
cd kernel ; $(MAKE) $@ -f makefile
cd class ; $(MAKE) $@ -f makefile
cd threads ; $(MAKE) $@ -f makefile
cd generics ; $(MAKE) $@ -f makefile
cd dpp ; $(MAKE) $@ -f makefile
find . -name '*~' -exec rm \{\} \;
find . -name '*.o' -exec rm \{\} \;
find . -name '*.obj' -exec rm \{\} \;
find . -name '*.tmp' -exec rm \{\} \;
find . -name '*.{*' -exec rm \{\} \;
find . -name '--linux-.---' -exec rm - \{\} \;
find examples -name '*.exe' -exec rm \{\} \;
find examples -name 'main' -exec rm \{\} \;
realclean : clean
rm -f setup.unx setup.dos setup.p9
ifeq ($(CC),$(HCC)) # keep host dpp if we are cross compiling
rm -f bin/dpp
rm -f bin/dpp.exe
rm -f bin/delcr
rm -f bin/delcr.exe
rm -f bin/addcr
endif
rm -rf lib/dynace.a lib/wds.a lib/dynlcm.lib lib/dynm32.pdb
ship-unix : realclean
find . -name '*.exe' -exec rm \{\} \;
setup.unx :
@-mkdir lib
cd bin ; $(HCC) -o delcr -O delcr.c
cd kernel ; ../bin/delcr makefile README *.d
cd class ; ../bin/delcr makefile README *.d
cd threads ; ../bin/delcr makefile README *.d
cd dpp ; ../bin/delcr makefile README *.d
# Times associated with .c files must be after the .d files for make's sake
sleep 2
cd kernel ; ../bin/delcr *.h *.iv *.c
cd class ; ../bin/delcr *.h *.c
cd threads ; ../bin/delcr *.c
cd dpp ; ../bin/delcr *.h
sleep 2
cd dpp ; ../bin/delcr *.c
cd docs ; ../bin/delcr *.txt
cd generics ; ../bin/delcr makefile README makegens mkgens3 mkgens4 mkgens4f mkgensx
cd include ; ../bin/delcr *.h
cd generics ; chmod 775 makegens mkgens3 mkgens4 mkgens4f mkgensx
find examples -name 'makefile' -exec bin/delcr \{\} \;
find examples -name 'readme' -exec bin/delcr \{\} \;
find examples -name 'README' -exec bin/delcr \{\} \;
find examples -name '*.h' -exec bin/delcr \{\} \;
find examples -name '*.d' -exec bin/delcr \{\} \;
find examples -name '*.c' -exec bin/delcr \{\} \;
bin/delcr examples/list.txt makefile makefile.inc
# find multhead -type f -exec bin/delcr \{\} \;
rm -f setup.dos
touch setup.unx
setup.dos :
cd bin ; $(CC) -o addcr -O addcr.c
cd include ; ../bin/addcr *.h
cd kernel ; ../bin/addcr README *.d *.h *.iv *.c
cd class ; ../bin/addcr README *.d *.h *.c
cd threads ; ../bin/addcr README *.d *.c
cd dpp ; ../bin/addcr README *.d *.h *.c
cd docs ; ../bin/delcr *
cd generics ; ../bin/addcr README
find examples -name 'readme' -exec bin/addcr \{\} \;
find examples -name 'README' -exec bin/addcr \{\} \;
find examples -name '*.h' -exec bin/addcr \{\} \;
find examples -name '*.d' -exec bin/addcr \{\} \;
find examples -name '*.c' -exec bin/addcr \{\} \;
bin/addcr examples/list.txt
rm -f setup.unx
touch setup.dos
# rebuilds generics.h from scratch
makegens:
cd kernel ; rm -f generics.* ; $(DPP) $(DPPOPTS) -h -i -s *.d ; mv generics.h ../include
cd class ; $(DPP) $(DPPOPTS) -h -i -g ../include/generics.h -s *.d ; mv generics.h ../include
cd threads ; $(DPP) $(DPPOPTS) -h -i -g ../include/generics.h -s *.d ; mv generics.h ../include
# rebuilds generics.h from scratch and pre-processes all .d files
newgens : makegens
cd kernel ; $(MAKE) -f makefile reallynewgens
cd class ; $(MAKE) -f makefile newgens
cd threads ; $(MAKE) -f makefile newgens
ifeq ($(CC),$(HCC)) # not on cross-compile
cd dpp ; $(MAKE) -f makefile newgens ; $(MAKE) -f makefile generics.c
endif
# The following target is used to convert an SVN checkout into a shippable distribution
# It must only be run immediatly after a co or export
# It creates a system which can boot without DPP
bootable:
rm -f include/generics.h
cp bin/Linux/dpp bin
chmod 755 bin/dpp
$(MAKE) -f makefile STRAT=-S2 newgens