wyebadblock/makefile

54 lines
1.3 KiB
Makefile
Raw Normal View History

LISTNAME=easylist.txt
2017-07-18 05:57:18 +00:00
EXTENSION_DIR=$(DESTDIR)/usr/lib/wyebrowser
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
2018-05-22 06:01:28 +00:00
adblock.so: ab.c 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` \
2018-06-06 05:10:35 +00:00
$(DDEBUG) -DISEXT -DEXENAME=\"wyebab\"
2017-07-17 08:21:10 +00:00
2018-05-22 06:01:28 +00:00
wyebab: ab.c ephy-uri-tester.c ephy-uri-tester.h librun.o makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< librun.o \
2018-05-29 16:00:21 +00:00
`pkg-config --cflags --libs glib-2.0 gio-2.0` \
$(DDEBUG) -DDIRNAME=\"wyebadblock\" -DLISTNAME=\"$(LISTNAME)\"
2017-07-18 00:24:01 +00:00
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)
2018-05-19 15:51:50 +00:00
testrun: wyebrun.c wyebrun.h makefile
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< \
`pkg-config --cflags --libs glib-2.0 gio-2.0` \
2018-06-23 05:31:24 +00:00
$(DDEBUG) -DTESTER=1
2018-05-19 15:51:50 +00:00
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:
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