source: trunk/tools/wrc/makefile@ 10367

Last change on this file since 10367 was 6109, checked in by bird, 24 years ago

Made it compile without bison and flex, and with the other compilers. But due to performance we have to add -O and -Tm- in debug mode of VAC.

File size: 2.1 KB
Line 
1# $Id: makefile,v 1.5 2001-06-26 00:08:46 bird Exp $
2
3#
4# WRC makefile.
5#
6# Note. If you wanna recompile everything you'll need flex and bison.
7# Both are found at hobbes.
8# AND you'll have to set env.var. HAVE_BISON and HAVE_FLEX.
9#
10
11
12#
13# Directory macro.
14#
15ODIN32_BIN = $(ODIN32_TOOLS)
16
17
18#
19# Tell buildenvironment that we're making an VIO .exe.
20# Tell buildenvironment that we like to use static linked CRT.
21# Tell buildenvironment that we should not copy this into /bin.
22#
23EXETARGET = 1
24VIO = 1
25STATIC_CRT = 1
26NO_MAIN_BIN_COPY = 1
27
28
29# Subdirectories.
30SUBDIRS = \
31.\u
32
33
34#
35# include common definitions
36#
37!include ../../makefile.inc
38
39
40#
41# Addjust common definitions
42#
43!if "$(CCENV)" == "EMX"
44CDEFINES = $(CDEFINES) -D__EMX__ -DMASM -D__SEMICOLON__
45!else
46CDEFINES = $(CDEFINES) -DMASM -D__SEMICOLON__ -DYY_USE_PROTOS
47!endif
48!if "$(VAC3)" == "1" || "$(VAC36)" == "1"
49!ifdef DEBUG
50CFLAGS = $(CFLAGS) -O+ -Tm-
51!endif
52!endif
53
54
55YACC = bison
56YACCOPT = #-v
57LEX = flex
58
59
60#
61# Object extension.
62#
63OBJ = obj
64
65#
66# Object files. Prefix with OBJDIR and one space before the '\'.
67#
68OBJS=\
69$(OBJDIR)\dumpres.$(OBJ) \
70$(OBJDIR)\genres.$(OBJ) \
71$(OBJDIR)\newstruc.$(OBJ) \
72$(OBJDIR)\preproc.$(OBJ) \
73$(OBJDIR)\readres.$(OBJ) \
74$(OBJDIR)\utils.$(OBJ) \
75$(OBJDIR)\wrc.$(OBJ) \
76$(OBJDIR)\y.tab.$(OBJ) \
77$(OBJDIR)\lexyy.$(OBJ) \
78$(OBJDIR)\ppy.tab.$(OBJ) \
79$(OBJDIR)\lex.ppl.$(OBJ) \
80$(OBJDIR)\writeres.$(OBJ) \
81!if "$(CCENV)" == "VAC36" || "$(CCENV)" == "VAC3"
82$(OBJDIR)\getopt.$(OBJ)
83!endif
84
85
86#
87# Libraries. One space before the '\'.
88#
89LIBS = \
90u\$(OBJDIR)\u.lib\
91$(RTLLIB) \
92os2386.lib
93
94
95#
96# Target name - name of the exe without extention and path.
97#
98TARGET = wrc
99
100
101#
102# Includes the common rules.
103#
104!include $(ODIN32_POST_INC)
105
106
107#
108# Needed tools
109#
110needed: all
111
112
113#
114# Extra rules.
115#
116!ifdef HAVE_BISON
117y.tab.c y.tab.h: parser.y
118 $(YACC) -d -t parser.y -o y.tab.c
119
120ppy.tab.c ppy.tab.h: ppy.y
121 $(YACC) $(YACCOPT) -bppy -ppp -d -t ppy.y -o ppy.tab.c
122!endif
123
124!ifdef HAVE_FLEX
125lexyy.c: parser.l
126 $(LEX) -8 -d parser.l
127
128lex.ppl.c: ppl.l
129 $(LEX) $(LEXOPT) -d -Ppp -8 -olex.ppl.c ppl.l
130!endif
Note: See TracBrowser for help on using the repository browser.