54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
include Makefile.conf
|
|
|
|
.PHONY: all
|
|
all: libiglboolean
|
|
debug: libiglboolean
|
|
|
|
include Makefile.conf
|
|
all: CFLAGS += -O3 -DNDEBUG -std=c++11
|
|
debug: CFLAGS += -g -Wall -std=c++11
|
|
|
|
.PHONY: libiglboolean
|
|
libiglboolean: obj ../lib/libiglboolean.a
|
|
|
|
SRC_DIR=../include/igl/boolean/
|
|
CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
|
|
OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
|
|
|
|
# include igl headers
|
|
INC+=-I../include/
|
|
|
|
# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
|
|
|
|
# Eigen dependency
|
|
EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
|
|
INC+=$(EIGEN3_INC)
|
|
|
|
# cork dependency
|
|
#CORK=../external/cork
|
|
#CORK_INC=-I$(cork)/common -I$(cork)/rtcore/
|
|
CORK=../external/cork/
|
|
CORK_INC=-I$(CORK)/include/
|
|
INC+=$(CORK_INC)
|
|
|
|
# CGAL dependency
|
|
CGAL=$(DEFAULT_PREFIX)
|
|
CGAL_INC=-I$(CGAL)/include
|
|
CGAL_FLAGS=-frounding-math -fsignaling-nans
|
|
CFLAGS+=$(CGAL_FLAGS)
|
|
INC+=$(CGAL_INC)
|
|
|
|
obj:
|
|
mkdir -p obj
|
|
|
|
../lib/libiglboolean.a: $(OBJ_FILES)
|
|
rm -f $@
|
|
ar cqs $@ $(OBJ_FILES)
|
|
|
|
obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
|
|
g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
|
|
|
|
clean:
|
|
rm -f $(OBJ_FILES)
|
|
rm -f ../lib/libiglboolean.a
|