wyebadblock/makefile

62 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

LISTNAME=easylist.txt
2018-11-17 11:05:45 +00:00
PREFIX ?= /usr
2023-02-12 02:23:24 +00:00
WEBKITVER ?= 4.0
2023-02-12 02:21:33 +00:00
WEBKIT ?= webkit2gtk-$(WEBKITVER)
2023-02-12 03:03:52 +00:00
EXTENSION_DIR ?= $(PREFIX)/lib/wyebrowser
2023-02-12 02:02:20 +00:00
ifneq ($(WEBKITVER), 4.0)
VERDIR=/$(WEBKITVER)
endif
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 \
2022-09-17 11:50:56 +00:00
`pkg-config --cflags --libs gtk+-3.0 glib-2.0 $(WEBKIT)` \
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-11-17 11:05:45 +00:00
install -Dm755 wyebab $(DESTDIR)$(PREFIX)/bin/wyebab
2023-02-12 02:02:20 +00:00
install -Dm755 adblock.so $(DESTDIR)$(EXTENSION_DIR)$(VERDIR)/adblock.so
2017-07-17 08:21:10 +00:00
2017-12-31 06:09:38 +00:00
uninstall:
2018-11-17 11:05:45 +00:00
rm -f $(PREFIX)/bin/wyebab
2023-02-12 02:02:20 +00:00
rm -f $(EXTENSION_DIR)$(VERDIR)/adblock.so
-rmdir $(EXTENSION_DIR)$(VERDIR)
2017-12-31 06:09:38 +00:00
-rmdir $(EXTENSION_DIR)
2018-05-20 05:48:42 +00:00
re: clean all
# $(MAKE) clean
# $(MAKE) all
full: re install