Lines 1-15
Link Here
|
1 |
--- ./Makefile.orig 2013-12-18 15:23:41.000000000 -0200 |
1 |
--- ./Makefile.orig 2013-12-18 15:23:41.000000000 -0200 |
2 |
+++ ./Makefile 2013-12-18 15:23:54.000000000 -0200 |
2 |
+++ ./Makefile 2013-12-18 15:23:54.000000000 -0200 |
3 |
@@ -1,10 +1,17 @@ |
3 |
@@ -1,10 +1,18 @@ |
4 |
PACKAGE = apngasm |
4 |
PACKAGE = apngasm |
5 |
-CC = gcc |
5 |
-CC = gcc |
6 |
+CC ?= cc |
6 |
-SRC_DIRS = . 7z zopfli |
7 |
+CXX ?= c++ |
|
|
8 |
SRC_DIRS = . 7z zopfli |
9 |
-CFLAGS = -Wall -pedantic |
7 |
-CFLAGS = -Wall -pedantic |
10 |
-CFLAGS_OPT = -O2 |
8 |
-CFLAGS_OPT = -O2 |
11 |
-CFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses |
9 |
-CFLAGS_7Z = -Wno-sign-compare -Wno-reorder -Wno-maybe-uninitialized -Wno-parentheses |
12 |
-LIBS = -lstdc++ -lm -lpng -lz |
10 |
-LIBS = -lstdc++ -lm -lpng -lz |
|
|
11 |
+CC ?= cc |
12 |
+CXX ?= c++ |
13 |
+SRC_DIRS = . 7z |
13 |
+CFLAGS += -Wall -pedantic |
14 |
+CFLAGS += -Wall -pedantic |
14 |
+CXXFLAGS += -Wall -pedantic |
15 |
+CXXFLAGS += -Wall -pedantic |
15 |
+CPPFLAGS += $(shell libpng-config --cflags) |
16 |
+CPPFLAGS += $(shell libpng-config --cflags) |
Lines 17-22
Link Here
|
17 |
+ifeq ($(strip $(STATIC)),) |
18 |
+ifeq ($(strip $(STATIC)),) |
18 |
+LIBS = $(shell libpng-config --ldflags) |
19 |
+LIBS = $(shell libpng-config --ldflags) |
19 |
+else |
20 |
+else |
|
|
21 |
+SRC_DIRS += zopfli |
20 |
+LIBS = $(shell libpng-config --static --ldflags) |
22 |
+LIBS = $(shell libpng-config --static --ldflags) |
21 |
+LDFLAGS += -static |
23 |
+LDFLAGS += -static |
22 |
+endif |
24 |
+endif |