Reorg: move svg-flatten files into subdir
This commit is contained in:
parent
617a42a674
commit
2133867c8a
25 changed files with 12 additions and 13 deletions
|
|
@ -4,6 +4,7 @@ LD := ld
|
|||
PKG_CONFIG ?= pkg-config
|
||||
|
||||
BUILDDIR ?= build
|
||||
UPSTREAM_DIR ?= ../upstream
|
||||
|
||||
SOURCES := src/svg_color.cpp \
|
||||
src/svg_doc.cpp \
|
||||
|
|
@ -20,15 +21,16 @@ SOURCES := src/svg_color.cpp \
|
|||
src/out_flattener.cpp \
|
||||
src/out_dilater.cpp \
|
||||
src/lambda_sink.cpp \
|
||||
$(UPSTREAM_DIR)/cpp-base64/base64.cpp
|
||||
|
||||
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/
|
||||
SUBPROCESS_INCLUDES ?= -Iupstream/subprocess.h
|
||||
CLIPPER_SOURCES ?= $(UPSTREAM_DIR)/clipper-6.4.2/cpp/clipper.cpp $(UPSTREAM_DIR)/clipper-6.4.2/cpp/cpp_cairo/cairo_clipper.cpp
|
||||
CLIPPER_INCLUDES ?= -I$(UPSTREAM_DIR)/clipper-6.4.2/cpp -I$(UPSTREAM_DIR)/clipper-6.4.2/cpp/cpp_cairo/
|
||||
VORONOI_INCLUDES ?= -I$(UPSTREAM_DIR)/voronoi/src
|
||||
POISSON_INCLUDES ?= -I$(UPSTREAM_DIR)/poisson-disk-sampling/thinks/poisson_disk_sampling/
|
||||
BASE64_INCLUDES ?= -I$(UPSTREAM_DIR)/cpp-base64
|
||||
ARGAGG_INCLUDES ?= -I$(UPSTREAM_DIR)/argagg/include/argagg
|
||||
CAVC_INCLUDES ?= -I$(UPSTREAM_DIR)/CavalierContours/include/cavc/
|
||||
SUBPROCESS_INCLUDES ?= -I$(UPSTREAM_DIR)/subprocess.h
|
||||
|
||||
SOURCES += $(CLIPPER_SOURCES)
|
||||
INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES) $(CAVC_INCLUDES) $(SUBPROCESS_INCLUDES)
|
||||
|
|
@ -39,18 +41,15 @@ CXXFLAGS += $(shell $(PKG_CONFIG) --cflags pangocairo pugixml opencv4)
|
|||
LDFLAGS := -lm -lc -lstdc++
|
||||
LDFLAGS += $(shell $(PKG_CONFIG) --libs pangocairo pugixml opencv4)
|
||||
|
||||
TARGET := svg-render
|
||||
TARGET := svg-flatten
|
||||
|
||||
all: $(BUILDDIR)/$(TARGET)
|
||||
|
||||
test.gbr test.svg &: render
|
||||
./render test.svg > test.gbr
|
||||
|
||||
$(BUILDDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) -c $(CXXFLAGS) $(CXXFLAGS) $(INCLUDES) -o $@ $^
|
||||
|
||||
$(BUILDDIR)/$(TARGET): $(SOURCES:%.cpp=$(BUILDDIR)/%.o) $(BUILDDIR)/upstream/cpp-base64/base64.o
|
||||
$(BUILDDIR)/$(TARGET): $(SOURCES:%.cpp=$(BUILDDIR)/%.o)
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue