Project

General

Profile

Statistics
| Branch: | Revision:

cool / src / lib / GMLMIP-0.1 / makefile @ 7c4d2eb4

History | View | Annotate | Download (1.39 KB)

1

    
2
include config.mk
3

    
4
POBJS = ./parser/lex.yy.o ./parser/mlf-parser.tab.o ./parser/mlf-driver.o
5
FOBJS = ./formulas/formula.o ./formulas/GML_formula.o ./formulas/PML_formula.o ./formulas/rational.o ./formulas/satisfyingassignment.o
6
ROBJS = ./rules/premise.o ./rules/GML_premise.o ./rules/PML_premise.o ./rules/valuation.o ./rules/setofconclusions.o ./rules/sizefunctions.o ./rules/radixtree.o
7

    
8
HEADERS = parser/mlf-parser.tab.h \
9
parser/mlf-driver.h     \
10
formulas/formula.h      \
11
formulas/satisfyingassignment.h \
12
parser/lex.yy.h
13

    
14
.PHONY: all clean parser/% formulas/% rules/%
15

    
16
all: main onestep-example onestep.o
17

    
18
.PHONY: phony
19
# don't do anything here
20
phony:
21
	@:
22

    
23

    
24
parser/%: phony
25
	@make --no-print-directory -C parser/ $(@:parser/%=%)
26

    
27
formulas/%: phony
28
	@make --no-print-directory -C formulas/ $(@:formulas/%=%)
29

    
30
rules/%: phony
31
	@make --no-print-directory -C rules/ $(@:rules/%=%)
32

    
33

    
34
main: main.o $(POBJS) $(FOBJS) $(ROBJS)
35
	$(GCC) $(GCCFLAGS) $(POBJS) $(FOBJS) $(ROBJS) -lbdd -lm -lglpk $< -o $@
36

    
37
onestep-example: onestep-example.o $(POBJS) $(FOBJS) $(ROBJS) onestep.o
38
	$(GCC) $(GCCFLAGS) $(POBJS) $(FOBJS) $(ROBJS) onestep.o -lbdd -lm -lglpk $< -o $@
39

    
40

    
41
main.o: main.cpp $(HEADERS)
42
	$(GCC) $(GCCFLAGS) -c $< -o $@
43

    
44
onestep-example.o: onestep-example.cpp $(HEADERS)
45
	$(GCC) $(GCCFLAGS) -c $<
46

    
47
onestep.o: onestep.cpp $(HEADERS)
48
	$(GCC) $(GCCFLAGS) -c $<
49

    
50
clean: parser/clean formulas/clean rules/clean
51
	rm -rf *.o main