diff options
author | jaseg <git@jaseg.de> | 2021-02-07 12:47:49 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-02-07 12:47:49 +0100 |
commit | 4a967682d48ed16db75f787976e99cd97df28356 (patch) | |
tree | 14d462370b9c4fe122ecd5f4146b816054b8c046 /svg-flatten/Makefile | |
parent | 79db2628583f7423d89a9e1892867106c8bf7a9a (diff) | |
download | gerbolyze-4a967682d48ed16db75f787976e99cd97df28356.tar.gz gerbolyze-4a967682d48ed16db75f787976e99cd97df28356.tar.bz2 gerbolyze-4a967682d48ed16db75f787976e99cd97df28356.zip |
Make inital test run on debian, ubuntu, arch, fedora
Diffstat (limited to 'svg-flatten/Makefile')
-rw-r--r-- | svg-flatten/Makefile | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svg-flatten/Makefile b/svg-flatten/Makefile index 88619fc..25c8048 100644 --- a/svg-flatten/Makefile +++ b/svg-flatten/Makefile @@ -1,6 +1,6 @@ CXX := clang++ -LD := ld +LD ?= ld INSTALL := install PKG_CONFIG ?= pkg-config @@ -46,7 +46,8 @@ CXXFLAGS += $(shell $(PKG_CONFIG) --cflags opencv4 2> /dev/null || $(PKG_CONFIG) LDFLAGS := -lm -lc -lstdc++ LDFLAGS += $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_DEPS)) # debian hack. see above. -LDFLAGS += $(shell $(PKG_CONFIG) --libs opencv4 2> /dev/null || $(PKG_CONFIG) --libs opencv 2>/dev/null) +OPENCV_LDFLAGS := $(shell $(PKG_CONFIG) --libs opencv4 2> /dev/null || $(PKG_CONFIG) --libs opencv 2>/dev/null) +LDFLAGS += $(shell echo $(OPENCV_LDFLAGS) | sed 's/-l\S\+ //g') -lopencv_core -lopencv_imgproc -lopencv_imgcodecs TARGET := svg-flatten @@ -65,7 +66,7 @@ $(BUILDDIR)/%.o: %.cpp $(BUILDDIR)/$(TARGET): $(SOURCES:%.cpp=$(BUILDDIR)/%.o) @mkdir -p $(dir $@) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lstdc++fs + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ -Wl,--start-group $^ -lstdc++fs -Wl,--end-group .PHONY: install install: |