File: Makefile.examples

package info (click to toggle)
gecode 3.4.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,136 kB
  • ctags: 16,905
  • sloc: cpp: 124,581; perl: 2,004; makefile: 1,453; sh: 247
file content (18 lines) | stat: -rw-r--r-- 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
CXXFLAGS=-O3 `pkg-config QtGui --cflags`
LDFLAGS=-lgecodedriver -lgecodegraph -lgecodescheduling `pkg-config QtGui --libs`
EXAMPLES=$(patsubst %.cpp,%,$(wildcard *.cpp))

all: $(EXAMPLES)

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

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

.PHONY: all clean

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