https://github.com/crillab/nacre_mini
Tip revision: 10b171a8fe3b3d0a89f3296b00be35167631ed90 authored by Gaël Glorian on 07 May 2018, 16:07:40 UTC
Initial commit
Initial commit
Tip revision: 10b171a
makefile
#-Wextra -pedantic -Wno-unused-parameter -Wall -Wextra -ansi
CFLAGS = -std=c++14 -O3 -Wall -DNDEBUG
EXEC = test
LIBS = `xml2-config --libs`
INC = `xml2-config --cflags` -I../include
CPP_FILES := $(wildcard ../src/*.cc)
OBJ_FILES := $(addprefix ../obj/,$(notdir $(CPP_FILES:.cc=.o)))
all: main.cc $(OBJ_FILES)
$(CXX) $(CFLAGS) $(INC) -o $(EXEC) $^ $(LIBS)
../obj/%.o: ../src/%.cc
@mkdir -p ../obj
$(CXX) $(CFLAGS) $(INC) -c -o $@ $<
lib: $(OBJ_FILES)
@mkdir -p ../lib
ar rcsv ../lib/libparserxcsp3core.a $(OBJ_FILES)
testlib: main.cc
$(CXX) $(CFLAGS) $(INC) -o testlib main.cc -L ../lib $(LIBS) -lparserxcsp3core
testTree: testTree.cc
$(CXX) $(CFLAGS) $(INC) -o testTree testTree.cc -L ../lib $(LIBS) -lparserxcsp3core
testCanonization: testCanonization.cc $(OBJ_FILES)
$(CXX) $(CFLAGS) $(INC) -o testCanonization testCanonization.cc -L ../lib $(LIBS) -lparserxcsp3core
clean:
rm -rf ../obj/*.o test ../lib/* testlib
