aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-26 23:21:31 +0100
committerjaseg <git@jaseg.de>2021-01-26 23:21:31 +0100
commit3cee5d4f018be6d4f494fb2ab1018fbf53b2f15f (patch)
tree993db446589acb970392bf4a40049088bd30630c /Makefile
parentbc0ef634cf5142ea51c55d63b241c1f5e1d0e4b2 (diff)
downloadgerbolyze-3cee5d4f018be6d4f494fb2ab1018fbf53b2f15f.tar.gz
gerbolyze-3cee5d4f018be6d4f494fb2ab1018fbf53b2f15f.tar.bz2
gerbolyze-3cee5d4f018be6d4f494fb2ab1018fbf53b2f15f.zip
The cavalier flattener works!!1!
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 074c6b8..ed71204 100644
--- a/Makefile
+++ b/Makefile
@@ -16,17 +16,21 @@ SOURCES := src/svg_color.cpp \
src/main.cpp \
src/out_svg.cpp \
src/out_gerber.cpp \
+ src/out_flattener.cpp \
src/lambda_sink.cpp \
-SOURCES += upstream/clipper-6.4.2/cpp/clipper.cpp upstream/clipper-6.4.2/cpp/cpp_cairo/cairo_clipper.cpp
-CLIPPER_INCLUDES := -Iupstream/clipper-6.4.2/cpp -Iupstream/clipper-6.4.2/cpp/cpp_cairo/
-VORONOI_INCLUDES := -Iupstream/voronoi/src
-POISSON_INCLUDES := -Iupstream/poisson-disk-sampling/thinks/poisson_disk_sampling/
-BASE64_INCLUDES := -Iupstream/cpp-base64
-ARGAGG_INCLUDES := -Iupstream/argagg/include/argagg
-INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES)
+CLIPPER_SOURCES ?= upstream/clipper-6.4.2/cpp/clipper.cpp upstream/clipper-6.4.2/cpp/cpp_cairo/cairo_clipper.cpp
+CLIPPER_INCLUDES ?= -Iupstream/clipper-6.4.2/cpp -Iupstream/clipper-6.4.2/cpp/cpp_cairo/
+VORONOI_INCLUDES ?= -Iupstream/voronoi/src
+POISSON_INCLUDES ?= -Iupstream/poisson-disk-sampling/thinks/poisson_disk_sampling/
+BASE64_INCLUDES ?= -Iupstream/cpp-base64
+ARGAGG_INCLUDES ?= -Iupstream/argagg/include/argagg
+CAVC_INCLUDES ?= -Iupstream/CavalierContours/include/cavc/
-CXXFLAGS := -std=c++2a -g -Wall -Wextra
+SOURCES += $(CLIPPER_SOURCES)
+INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES) $(CAVC_INCLUDES)
+
+CXXFLAGS := -std=c++2a -g -Wall -Wextra -O0
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags pangocairo pugixml opencv4)
LDFLAGS := -lm -lc -lstdc++
@@ -41,7 +45,7 @@ $(BUILDDIR)/%.o: %.cpp
@mkdir -p $(dir $@)
$(CXX) -c $(CXXFLAGS) $(CXXFLAGS) $(INCLUDES) -o $@ $^
-$(BUILDDIR)/svg-render: $(SOURCES:%.cpp=$(BUILDDIR)/%.o) $(BUILDDIR)/upstream/cpp-base64/base64.o $(CLIPPER_SOURCES:.cpp=.o)
+$(BUILDDIR)/svg-render: $(SOURCES:%.cpp=$(BUILDDIR)/%.o) $(BUILDDIR)/upstream/cpp-base64/base64.o
@mkdir -p $(dir $@)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^