Merge pull request #20 from vodik/makefile
Let CFLAGS and LDFLAGS be amended.
This commit is contained in:
commit
5b171ebc3c
12
Makefile
12
Makefile
|
@ -2,7 +2,7 @@ PREFIX = /usr/local
|
||||||
GTK = gtk+-3.0
|
GTK = gtk+-3.0
|
||||||
VTE = vte-2.90
|
VTE = vte-2.90
|
||||||
|
|
||||||
CFLAGS += -std=c99 -O3 \
|
CFLAGS := -std=c99 -O3 \
|
||||||
-Wall -Wextra -pedantic \
|
-Wall -Wextra -pedantic \
|
||||||
-Winit-self \
|
-Winit-self \
|
||||||
-Wshadow \
|
-Wshadow \
|
||||||
|
@ -15,13 +15,14 @@ CFLAGS += -std=c99 -O3 \
|
||||||
-Wc++-compat \
|
-Wc++-compat \
|
||||||
-Wbad-function-cast \
|
-Wbad-function-cast \
|
||||||
-Wunused-macros \
|
-Wunused-macros \
|
||||||
$(shell pkg-config --cflags ${GTK} ${VTE})
|
$(shell pkg-config --cflags ${GTK} ${VTE}) \
|
||||||
|
${CFLAGS}
|
||||||
|
|
||||||
ifeq (${CC}, clang)
|
ifeq (${CC}, clang)
|
||||||
CFLAGS += -Wno-missing-field-initializers
|
CFLAGS += -Wno-missing-field-initializers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS += -s -Wl,--as-needed $(shell pkg-config --libs ${GTK} ${VTE})
|
LDFLAGS := -s -Wl,--as-needed $(shell pkg-config --libs ${GTK} ${VTE}) ${LDFLAGS}
|
||||||
|
|
||||||
termite: termite.c config.h
|
termite: termite.c config.h
|
||||||
${CC} ${CFLAGS} -o $@ $< ${LDFLAGS}
|
${CC} ${CFLAGS} -o $@ $< ${LDFLAGS}
|
||||||
|
@ -34,4 +35,7 @@ install: termite
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f ${DESTDIR}${PREFIX}/bin/termite
|
rm -f ${DESTDIR}${PREFIX}/bin/termite
|
||||||
|
|
||||||
.PHONY: install uninstall
|
clean:
|
||||||
|
rm termite
|
||||||
|
|
||||||
|
.PHONY: clean install uninstall
|
||||||
|
|
Loading…
Reference in New Issue