1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
CXXFLAGS=-O3 -fPIC `pkg-config Qt5Widgets --cflags`
LDFLAGS=-lgecodedriver -lgecodesupport -lgecodekernel -lgecodesearch -lgecodeint -lgecodeminimodel -lgecodegist -lgecodeset -lgecodefloat -lpthread `pkg-config Qt5Widgets --libs`
EXAMPLES=$(patsubst %.cpp,%,$(wildcard *.cpp)) $(patsubst %.cpp.gz,%,$(wildcard *.cpp.gz))
all: $(EXAMPLES)
examples/scowl.hpp examples/sudoku-instances.hh $(addsuffix .cpp,$(EXAMPLES)):
gunzip $@.gz
$(addsuffix .o,$(EXAMPLES)): $(addsuffix .cpp,$(EXAMPLES)) examples/scowl.hpp examples/sudoku-instances.hh
g++ $(CXXFLAGS) $(patsubst %.o,%.cpp,$@) -c
clean:
rm -f $(EXAMPLES)
rm -f *.o
.PHONY: all clean
.SECONDEXPANSION:
$(EXAMPLES): $$@.o
g++ $@.o -o $@ $(LDFLAGS)
|