1 # $Id: proto.make,v 1.10 1994/06/24 10:12:59 ceriel Exp $
3 #PARAMS do not remove this line!
5 SRC_DIR = $(SRC_HOME)/util/ack
32 CFILES = $(DSRC) $(ISRC)
49 ACKDIR=$(TARGET_HOME)/lib
52 LNTABLES=acc apc abc ocm m2 f2c vax4 i86 i386 m68k2 m68k4 pmds pmds4 mantra \
53 m68020 z8000 pdp em22 em24 em44 6500 6800 6805 6809 i80 ns s2650 z80 \
54 sun2 xenix3 minix minixST sparc sparc_solaris arm
55 INCLUDES=-I$(TARGET_HOME)/h -I$(TARGET_HOME)/config -I$(SRC_DIR)
56 CFLAGS= $(INCLUDES) $(COPTIONS)
57 UCFLAGS= $(INCLUDES) $(UCOPTIONS)
58 LINTFLAGS= $(INCLUDES) $(LINTOPTIONS)
60 ULDFLAGS= $(ULDOPTIONS)
61 BINDIR=$(TARGET_HOME)/bin
63 MODDIR=$(TARGET_HOME)/modules/lib
70 for i in $(INTABLES) $(LNTABLES) ; do rm -f $$i ; ln ack $$i ; done
71 if [ $(DO_MACHINE_INDEP) = y ] ; \
72 then mk_manpage ack.1 $(TARGET_HOME) ; \
76 -cmp ack $(BINDIR)/ack
78 ack.1: $(SRC_DIR)/ack.1.X
79 -sh -c 'tbl < $(SRC_DIR)/ack.1.X > ack.1'
80 -sh -c 'if test -s ack.1 ; then : ; else cp $(SRC_DIR)/ack.1.X ack.1 ; fi'
83 -rm -f *.old *.$(SUF) mktables *.$(USUF) ack ack.1 $(ISRC)
86 $(CC) $(LDFLAGS) -o ack $(OBJ) $(MODDIR)/libstring.$(LIBSUF)
89 rm_deps Makefile > Makefile.new
90 for i in $(CFILES) ; do \
91 echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
92 echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
93 $(UTIL_HOME)/lib.bin/cpp -d $(INCLUDES) $$i | sed "s/^/`basename $$i .c`.$$(SUF): /" >> Makefile.new ; \
95 mv Makefile Makefile.old
96 mv Makefile.new Makefile
98 dmach.c intable.c: mktables $(SRC_DIR)/dmach.h
99 : mktables $(ACKDIR) # $(FE) $(INTABLES)
102 mktables: mktables.$(USUF)
103 $(UCC) -o mktables $(ULDFLAGS) mktables.$(USUF)
105 mktables.$(USUF): $(SRC_DIR)/mktables.c
106 $(UCC) -c $(UCFLAGS) $(SRC_DIR)/mktables.c
109 @pr $(SRC_DIR)/proto.make $(HFILES) $(DSRC)
115 $(LINT) $(LINTFLAGS) $(CFILES) $(UTIL_HOME)/modules/lib/$(LINTPREF)string.$(LINTSUF)
117 # do not remove the next line
119 list.$(SUF): $(SRC_DIR)/list.c
120 $(CC) -c $(CFLAGS) $(SRC_DIR)/list.c
121 list.$(SUF): $(SRC_DIR)/list.h
122 list.$(SUF): $(SRC_DIR)/ack.h
123 data.$(SUF): $(SRC_DIR)/data.c
124 $(CC) -c $(CFLAGS) $(SRC_DIR)/data.c
125 data.$(SUF): $(SRC_DIR)/data.h
126 data.$(SUF): $(SRC_DIR)/trans.h
127 data.$(SUF): $(SRC_DIR)/list.h
128 data.$(SUF): $(SRC_DIR)/ack.h
129 main.$(SUF): $(SRC_DIR)/main.c
130 $(CC) -c $(CFLAGS) $(SRC_DIR)/main.c
131 main.$(SUF): $(SRC_DIR)/data.h
132 main.$(SUF): $(TARGET_HOME)/config/local.h
133 main.$(SUF): $(SRC_DIR)/trans.h
134 main.$(SUF): $(SRC_DIR)/list.h
135 main.$(SUF): $(SRC_DIR)/ack.h
136 scan.$(SUF): $(SRC_DIR)/scan.c
137 $(CC) -c $(CFLAGS) $(SRC_DIR)/scan.c
138 scan.$(SUF): $(SRC_DIR)/data.h
139 scan.$(SUF): $(SRC_DIR)/trans.h
140 scan.$(SUF): $(SRC_DIR)/list.h
141 scan.$(SUF): $(SRC_DIR)/ack.h
142 svars.$(SUF): $(SRC_DIR)/svars.c
143 $(CC) -c $(CFLAGS) $(SRC_DIR)/svars.c
144 svars.$(SUF): $(SRC_DIR)/ack.h
145 trans.$(SUF): $(SRC_DIR)/trans.c
146 $(CC) -c $(CFLAGS) $(SRC_DIR)/trans.c
147 trans.$(SUF): $(SRC_DIR)/data.h
148 trans.$(SUF): $(SRC_DIR)/grows.h
149 trans.$(SUF): $(SRC_DIR)/trans.h
150 trans.$(SUF): $(SRC_DIR)/list.h
151 trans.$(SUF): $(SRC_DIR)/ack.h
152 util.$(SUF): $(SRC_DIR)/util.c
153 $(CC) -c $(CFLAGS) $(SRC_DIR)/util.c
154 util.$(SUF): $(SRC_DIR)/ack.h
155 rmach.$(SUF): $(SRC_DIR)/rmach.c
156 $(CC) -c $(CFLAGS) $(SRC_DIR)/rmach.c
157 rmach.$(SUF): $(SRC_DIR)/data.h
158 rmach.$(SUF): $(SRC_DIR)/dmach.h
159 rmach.$(SUF): $(SRC_DIR)/grows.h
160 rmach.$(SUF): $(SRC_DIR)/trans.h
161 rmach.$(SUF): $(SRC_DIR)/list.h
162 rmach.$(SUF): $(TARGET_HOME)/config/em_path.h
163 rmach.$(SUF): $(SRC_DIR)/ack.h
164 run.$(SUF): $(SRC_DIR)/run.c
165 $(CC) -c $(CFLAGS) $(SRC_DIR)/run.c
166 run.$(SUF): $(SRC_DIR)/data.h
167 run.$(SUF): $(SRC_DIR)/grows.h
168 run.$(SUF): $(SRC_DIR)/trans.h
169 run.$(SUF): $(SRC_DIR)/list.h
170 run.$(SUF): $(SRC_DIR)/ack.h
171 grows.$(SUF): $(SRC_DIR)/grows.c
172 $(CC) -c $(CFLAGS) $(SRC_DIR)/grows.c
173 grows.$(SUF): $(SRC_DIR)/grows.h
174 grows.$(SUF): $(SRC_DIR)/ack.h
175 files.$(SUF): $(SRC_DIR)/files.c
176 $(CC) -c $(CFLAGS) $(SRC_DIR)/files.c
177 files.$(SUF): $(TARGET_HOME)/config/em_path.h
178 files.$(SUF): $(SRC_DIR)/data.h
179 files.$(SUF): $(SRC_DIR)/grows.h
180 files.$(SUF): $(SRC_DIR)/trans.h
181 files.$(SUF): $(SRC_DIR)/list.h
182 files.$(SUF): $(SRC_DIR)/ack.h
183 dmach.$(SUF): dmach.c
184 $(CC) -c $(CFLAGS) dmach.c
185 dmach.$(SUF): $(SRC_DIR)/dmach.h
186 intable.$(SUF): intable.c
187 $(CC) -c $(CFLAGS) intable.c