| 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 | #
|
|---|
| 15 | ODIN32_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 | #
|
|---|
| 23 | EXETARGET = 1
|
|---|
| 24 | VIO = 1
|
|---|
| 25 | STATIC_CRT = 1
|
|---|
| 26 | NO_MAIN_BIN_COPY = 1
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | # Subdirectories.
|
|---|
| 30 | SUBDIRS = \
|
|---|
| 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"
|
|---|
| 44 | CDEFINES = $(CDEFINES) -D__EMX__ -DMASM -D__SEMICOLON__
|
|---|
| 45 | !else
|
|---|
| 46 | CDEFINES = $(CDEFINES) -DMASM -D__SEMICOLON__ -DYY_USE_PROTOS
|
|---|
| 47 | !endif
|
|---|
| 48 | !if "$(VAC3)" == "1" || "$(VAC36)" == "1"
|
|---|
| 49 | !ifdef DEBUG
|
|---|
| 50 | CFLAGS = $(CFLAGS) -O+ -Tm-
|
|---|
| 51 | !endif
|
|---|
| 52 | !endif
|
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 | YACC = bison
|
|---|
| 56 | YACCOPT = #-v
|
|---|
| 57 | LEX = flex
|
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 | #
|
|---|
| 61 | # Object extension.
|
|---|
| 62 | #
|
|---|
| 63 | OBJ = obj
|
|---|
| 64 |
|
|---|
| 65 | #
|
|---|
| 66 | # Object files. Prefix with OBJDIR and one space before the '\'.
|
|---|
| 67 | #
|
|---|
| 68 | OBJS=\
|
|---|
| 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 | #
|
|---|
| 89 | LIBS = \
|
|---|
| 90 | u\$(OBJDIR)\u.lib\
|
|---|
| 91 | $(RTLLIB) \
|
|---|
| 92 | os2386.lib
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 | #
|
|---|
| 96 | # Target name - name of the exe without extention and path.
|
|---|
| 97 | #
|
|---|
| 98 | TARGET = wrc
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 | #
|
|---|
| 102 | # Includes the common rules.
|
|---|
| 103 | #
|
|---|
| 104 | !include $(ODIN32_POST_INC)
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 | #
|
|---|
| 108 | # Needed tools
|
|---|
| 109 | #
|
|---|
| 110 | needed: all
|
|---|
| 111 |
|
|---|
| 112 |
|
|---|
| 113 | #
|
|---|
| 114 | # Extra rules.
|
|---|
| 115 | #
|
|---|
| 116 | !ifdef HAVE_BISON
|
|---|
| 117 | y.tab.c y.tab.h: parser.y
|
|---|
| 118 | $(YACC) -d -t parser.y -o y.tab.c
|
|---|
| 119 |
|
|---|
| 120 | ppy.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
|
|---|
| 125 | lexyy.c: parser.l
|
|---|
| 126 | $(LEX) -8 -d parser.l
|
|---|
| 127 |
|
|---|
| 128 | lex.ppl.c: ppl.l
|
|---|
| 129 | $(LEX) $(LEXOPT) -d -Ppp -8 -olex.ppl.c ppl.l
|
|---|
| 130 | !endif
|
|---|