File: Makefile.examples

package info (click to toggle)
gecode 4.2.1-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,240 kB
  • ctags: 25,938
  • sloc: cpp: 191,769; perl: 2,033; makefile: 1,627; sh: 254
file content (21 lines) | stat: -rw-r--r-- 635 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CXXFLAGS=-O3 `pkg-config QtGui --cflags`
LDFLAGS=-lgecodedriver -lgecodesupport -lgecodekernel -lgecodesearch -lgecodeint -lgecodeminimodel -lgecodegist -lgecodeset -lgecodefloat -lpthread `pkg-config QtGui --libs`
EXAMPLES=$(patsubst %.cpp,%,$(wildcard *.cpp)) $(patsubst %.cpp.gz,%,$(wildcard *.cpp.gz))

all: $(EXAMPLES)

examples/scowl.hpp $(addsuffix .cpp,$(EXAMPLES)):
	gunzip $@.gz

$(addsuffix .o,$(EXAMPLES)): $(addsuffix .cpp,$(EXAMPLES)) examples/scowl.hpp
	g++ $(CXXFLAGS) $(patsubst %.o,%.cpp,$@) -c

clean:
	rm -f $(EXAMPLES)
	rm -f *.o

.PHONY: all clean

.SECONDEXPANSION:
$(EXAMPLES): $$@.o
	g++ $(LDFLAGS) $@.o -o $@