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