Makefile
1.45 KB
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
#!smake
#
# /usr/include/make/ ȤΤ
#
PRDEPTH=../..
include $(ROOT)/usr/include/make/PRdefs
SUBDIRS=ddproc hello_world makefat onetri topgun
TARGET= dwrite rom
#ifdef FINAL
LCDEFS = -DNDEBUG -D_FINALROM
ARGS = FINAL=
#endif
.NOTPARALLEL:
default:$(TARGET)
CLOBBERDIR= makefat onetri hello_world topgun ddproc
fat : ./makefat/makefat onetri.rom
./makefat/makefat ./onetri/onetri code
# ./makefat/makefat `grep onetri.rom ./onetri/gwrite` -o ./onetri/codesegment.o
# set GLINE=`grep onetri.rom ./onetri/gwrite`
# ./makefat/makefat $$GLINE
./makefat/makefat !
(cd makefat; $(MAKE) $(ARGS))
onetri.rom : ./onetri/onetri.rom
cp ./onetri/onetri.rom .
./onetri/onetri.rom !
(cd onetri; $(MAKE) $(ARGS));
hello.rom : ./hello_world/hello.rom
cp ./hello_world/hello.rom .
./hello_world/hello.rom !
(cd hello_world; $(MAKE) $(ARGS));
rom : ./topgun/topgun.rom
cp ./topgun/topgun ./reboot
cp ./topgun/topgun.rom rom
./topgun/topgun.rom !
(cd topgun; $(MAKE) $(ARGS));
dwrite : fat onetri.rom hello.rom
echo "leowrite -L 49 -t 0 -I id.dat fat" > dwrite
cat ./onetri/gwrite ./hello_world/gwrite >> dwrite
clobber :
@for d in $(CLOBBERDIR); do $(SUBDIR_MAKERULE); done
rm -rf $(TARGET) fat hello.rom onetri.rom reboot Makedepend
clean :
@for d in $(CLOBBERDIR); do $(SUBDIR_MAKERULE); done
rm -rf $(TARGET) fat hello.rom onetri.rom reboot
install: default
$(INSTALL) -m 444 -F /usr/src/PR/demos/reboot \
Makefile id.dat
$(SUBDIRS_MAKERULE)