Minor changes.
[egate.git] / fml / Makefile
1 # FML interpreter. Europagate, 1995
2 #
3 # $Id: Makefile,v 1.15 1995/04/17 09:32:08 adam Exp $
4
5 SHELL=/bin/sh
6 INCLUDE=-I../include -I. $(REGEXINC)
7 TPROG1=fmltest
8 #CFLAGS=-g -Wall -pedantic
9 CPP=$(CC) -E
10 DEFS=$(INCLUDE) -DUSE_GNU_REGEX=1
11 LIB=../lib/fml.a 
12 PO = fmltoken.o fmlmem.o fml.o fmlsym.o fmlrel.o fmlarit.o fmllist.o \
13 fmlcall.o fmlcalls.o fmlmarc.o fmlstr.o
14
15 all: $(LIB) $(TPROG1) $(TPROG2)
16
17 $(TPROG1): $(TPROG1).o $(LIB) 
18         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB) ../lib/util.a $(REGEXOBJ)
19
20 $(LIB): $(PO)
21         rm -f $(LIB)
22         ar qc $(LIB) $(PO)
23         ranlib $(LIB)
24
25 .c.o:
26         $(CC) -c $(DEFS) $(CFLAGS) $<
27
28 clean:
29         rm -f *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist
30
31 depend: depend2
32
33 depend1:
34         sed '/^#Depend/q' <Makefile >Makefile.tmp
35         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
36         mv -f Makefile.tmp Makefile
37
38 depend2:
39         $(CPP) $(DEFS) -M *.c >.depend  
40
41 #GNU make style depend
42 ifeq (.depend,$(wildcard .depend))
43 include .depend
44 endif
45
46 #Depend --- DOT NOT DELETE THIS LINE