forked from stengel/ecta2002
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (33 loc) · 1.06 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# the file "Depend" must exist for make to run
.SUFFIXES:
.SUFFIXES: .c .o .h
CC = gcc
# -lm links the math library in
CFLAGS = -ansi -Wall -O3
# needed for gmp library
LIBDIR = /usr/local/lib
%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
DEPFILE = Depend
COMOBJ = alloc.o col.o mp.o rat.o
INLEMOBJ = lemke.o inlemke.o
TREEOBJ = leaves.o prior.o rataux.o sfnf.o treegen.o treedef.o
GMPOBJ = gmpwrap.o glemke.o
METHOBJ = normform.o seqform.o rsf.o main.o gambit.o interface.o
ALLOBJ = $(COMOBJ) $(INLEMOBJ) $(TREEOBJ) $(METHOBJ) $(GMPOBJ)
# local variables for single substitutions
BINTREE = $(COMOBJ) $(TREEOBJ) $(METHOBJ) lemke.o
GMP = $(COMOBJ) $(TREEOBJ) $(METHOBJ) $(GMPOBJ)
gbin: $(GMP)
$(CC) $(CFLAGS) -L$(LIBDIR) -lgmp $(GMP) -o gbin
bintr: $(BINTREE)
$(CC) $(CFLAGS) -lm $(BINTREE) -o bintr
INLEMKE = $(COMOBJ) $(INLEMOBJ)
inlemke: $(INLEMKE)
$(CC) $(CFLAGS) $(INLEMKE) -o inlemke
depend::
gcc -MM $(ALLOBJ:.o=.c) > $(DEPFILE)
.PHONY : clean
clean:
-rm -f *.o core *.exe $(DEPFILE); touch $(DEPFILE); make depend
include $(DEPFILE)