summarylogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authoranthraxx2018-06-06 19:25:42 +0200
committeranthraxx2018-06-06 19:25:42 +0200
commit404593d707f4c593a0ffff0ddd364756ed6c86ee (patch)
treed9907823d8ed3c4f11e6d3c91420e6099f60e493 /Makefile
parente86fd26bbefe14b97198a16ab31148fad31f114b (diff)
downloadaur-glee.tar.gz
upgpkg: glee 5.4.0-4
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 9 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 06425fd825d..64fd3cd7f89 100644
--- a/Makefile
+++ b/Makefile
@@ -5,22 +5,21 @@ MINOR=4
SOURCES = $(shell find . -name "*.c")
+CC?=$(CC)
+CXX?=$(CXX)
SHARED_OBJS = $(SOURCES:.c=.shared.o)
STATIC_OBJS = $(SOURCES:.c=.static.o)
-EXTRA_CFLAGS= $(CFLAGS)
-SHARED_CFLAGS= -Wall $(EXTRA_CFLAGS) -fPIC
+SHARED_CFLAGS+=-fPIC
-LDFLAGS= -Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined
-EXTRA_LDFLAGS=
+LDFLAGS?= -Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined
LIBS=-lGL
-EXTRA_LIBS=
libGLee.so.$(MAJOR).$(MINOR): $(SHARED_OBJS)
- g++ $(LDFLAGS) $(EXTRA_LDFLAGS) -shared \
+ $(CXX) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared \
-Wl,-soname,libGLee.so.$(MAJOR) \
-o libGLee.so.$(MAJOR).$(MINOR) \
- $+ -o $@ $(EXTRA_LIBS) $(LIBS)
+ $+ -o $@ $(LIBS)
libGLee.so: libGLee.so.$(MAJOR).$(MINOR)
rm -f $@.$(MAJOR)
@@ -29,13 +28,13 @@ libGLee.so: libGLee.so.$(MAJOR).$(MINOR)
ln -s $@.$(MAJOR) $@
%.shared.o: %.cpp
- g++ -o $@ -c $+ $(SHARED_CFLAGS)
+ $(CXX) -o $@ -c $+ $(CFLAGS) $(CPPFLAGS) $(SHARED_CFLAGS)
%.shared.o: %.c
- gcc -o $@ -c $+ $(SHARED_CFLAGS)
+ $(CC) -o $@ -c $+ $(CFLAGS) $(CPPFLAGS) $(SHARED_CFLAGS)
%.so : %.o
- g++ $(LDFLAGS) $(EXTRA_LDFLAGS) -shared $^ -o $@
+ $(CXX) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared $^ -o $@
clean:
rm -f $(SHARED_OBJS)