]> 4ch.mooo.com Git - plz.git/blob - makefile
6f3b8206717ded0df7437e9687fb21bd28682ad2
[plz.git] / makefile
1 #\r
2 #       Higanbana Project makefile\r
3 #\r
4 #\r
5 # Possible optimizations for 8088 class processors\r
6 #\r
7 # -oa   Relax alias checking\r
8 # -ob   Try to generate straight line code\r
9 # -oe - expand user functions inline (-oe=20 is default, adds lots of code)\r
10 # -oh   Enable repeated optimizations\r
11 # -oi   generate certain lib funcs inline\r
12 # -oi+  Set max inline depth (C++ only, use -oi for C)\r
13 # -ok   Flowing of register save into function flow graph\r
14 # -ol   loop optimizations\r
15 # -ol+  loop optimizations plus unrolling\r
16 # -or   Reorder for pipelined (486+ procs); not sure if good to use\r
17 # -os   Favor space over time\r
18 # -ot   Favor time over space\r
19 # -ei   Allocate an "int" for all enum types\r
20 # -zp2  Allow compiler to add padding to structs\r
21 # -zpw  Use with above; make sure you are warning free!\r
22 # -0    8088/8086 class code generation\r
23 # -s    disable stack overflow checking\r
24 \r
25 # -zk0u translate kanji to unicode... wwww\r
26 # -zk0  kanji support~\r
27 # -zkl          current codepage\r
28 \r
29 #%.C\r
30 #192x144\r
31 #wwww will add these\r
32 !ifdef __LINUX__\r
33 REMOVECOMMAND=rm -f\r
34 COPYCOMMAND=cp -f\r
35 DIRSEP=/\r
36 OBJ=o\r
37 !else\r
38 REMOVECOMMAND=del\r
39 COPYCOMMAND=copy /y\r
40 DIRSEP=\\r
41 OBJ=obj\r
42 !endif\r
43 #!ifndef INCLUDE\r
44 #IN=..$(DIRSEP)..$(DIRSEP)fdos$(DIRSEP)watcom2$(DIRSEP)h\r
45 #IFLAGS=-i=$(IN)\r
46 #!endif\r
47 \r
48 TARGET_OS = dos\r
49 \r
50 #EXMMTESTDIR=16$(DIRSEP)exmmtest$(DIRSEP)\r
51 SRC=src$(DIRSEP)\r
52 SRCLIB=$(SRC)lib$(DIRSEP)\r
53 \r
54 AFLAGS=-mh -0 -d1 -e=65536\r
55 PLZFLAGS=-fh=plzpart.hed\r
56 SFLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768\r
57 DFLAGS=-DTARGET_MSDOS=16 -DMSDOS=1 $(SFLAGS)\r
58 ZFLAGS=-zk0 -zq -zc -zp8# -zm\r
59 CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo##wwww\r
60 OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok####x\r
61 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)\r
62 \r
63 \r
64 EXEC = plzpart.exe\r
65 \r
66 all: $(EXEC)\r
67 \r
68 #copper.$(OBJ) tweak.$(OBJ) asmyt.$(OBJ)\r
69 \r
70 #\r
71 #game and bakapi executables\r
72 #\r
73 plzpart.exe: plzpart.$(OBJ) copper.$(OBJ) tweak.$(OBJ) asmyt.$(OBJ) plz.$(OBJ)\r
74         wcl $(FLAGS) $(PLZFLAGS) plzpart.$(OBJ) copper.$(OBJ) tweak.$(OBJ) asmyt.$(OBJ) plz.$(OBJ) -fm=plzpart.map\r
75 \r
76 \r
77 #\r
78 #executable's objects\r
79 #\r
80 plzpart.$(OBJ): plzpart.h plzpart.c\r
81         wcl $(FLAGS) -c plzpart.c\r
82 \r
83 #\r
84 #non executable objects libraries\r
85 #\r
86 plz.$(OBJ): plz.h plz.c\r
87         wcl $(FLAGS) -c plz.c\r
88 tweak.$(OBJ): tweak.h tweak.c\r
89         wcl $(FLAGS) -c tweak.c\r
90 #tasm compiled...\r
91 copper.$(OBJ): copper.h copper.asm\r
92         wcl $(AFLAGS) -zcm=tasm -c copper.asm\r
93 # tweak.$(OBJ): tweak.h tweak.asm\r
94 #       wcl $(AFLAGS) -zcm=tasm -c tweak.asm\r
95 asmyt.$(OBJ): asmyt.h asmyt.asm\r
96         wcl $(AFLAGS) -zcm=tasm -c asmyt.asm\r
97 \r
98 #\r
99 #other~\r
100 #\r
101 clean: .symbolic\r
102         @$(REMOVECOMMAND) $(EXEC)\r
103 #       @$(REMOVECOMMAND) *.$(OBJ)\r
104         @$(REMOVECOMMAND) *.o\r