wyebadblock/makefile

56 lines
1.3 KiB
Makefile
Raw Normal View History

2017-07-18 05:57:18 +00:00
EXTENSION_DIR=$(DESTDIR)/usr/lib/wyebrowser
2017-07-17 08:21:10 +00:00
DAPPNAME=-DAPPNAME='"wyebadblock"'
2018-05-20 05:48:42 +00:00
ifeq ($(DEBUG), 1)
2018-05-19 15:51:50 +00:00
CFLAGS += -Wall
2018-05-20 05:48:42 +00:00
else
DEBUG = 0
CFLAGS += -Wno-deprecated-declarations
2018-05-19 15:51:50 +00:00
endif
2018-05-20 05:48:42 +00:00
DDEBUG=-DDEBUG=${DEBUG}
2018-05-19 15:51:50 +00:00
all: adblock.so wyebab librun.o testrun
adblock.so: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o -shared -fPIC \
2017-07-17 08:21:10 +00:00
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0` \
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
2018-05-19 15:51:50 +00:00
$(DDEBUG) $(DAPPNAME) -DISEXT
2017-07-17 08:21:10 +00:00
2018-05-19 15:51:50 +00:00
wyebab: ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o \
2018-05-19 15:51:50 +00:00
`pkg-config --cflags --libs glib-2.0 libsoup-2.4` \
2017-07-18 00:24:01 +00:00
-DEXTENSION_DIR=\"$(EXTENSION_DIR)\" \
$(DDEBUG) $(DAPPNAME)
2018-05-19 15:51:50 +00:00
librun.o: wyebrun.c wyebrun.h makefile
$(CC) $(CFLAGS) $(LDFLAGS) -c -o $@ $< -fPIC\
`pkg-config --cflags --libs glib-2.0` \
-DDEBUG=0
testrun: wyebrun.c wyebrun.h makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< \
`pkg-config --cflags --libs glib-2.0` \
-DDEBUG=1
2017-07-17 08:21:10 +00:00
clean:
rm -f adblock.so
2018-05-19 15:51:50 +00:00
rm -f wyebab
rm -f librun.o
rm -f testrun
2017-07-17 08:21:10 +00:00
install: all
2018-05-19 15:51:50 +00:00
install -Dm755 wyebab $(DESTDIR)/usr/bin/wyebab
2017-07-17 08:21:10 +00:00
install -Dm755 adblock.so $(EXTENSION_DIR)/adblock.so
2017-12-31 06:09:38 +00:00
uninstall:
2018-05-19 15:51:50 +00:00
rm -f $(DESTDIR)/usr/bin/wyebab
2017-12-31 06:09:38 +00:00
rm -f $(EXTENSION_DIR)/adblock.so
-rmdir $(EXTENSION_DIR)
2018-05-20 05:48:42 +00:00
re: clean all
# $(MAKE) clean
# $(MAKE) all
full: re install