2010-03-28 16:56:39 +04:00
|
|
|
CFLAGS := -std=c99 -g -O0 -D_BSD_SOURCE -D_POSIX_C_SOURCE -I.. \
|
2012-11-10 04:09:11 +04:00
|
|
|
$(shell pkg-config --cflags libcurl)
|
|
|
|
LDFLAGS := $(shell pkg-config --libs libcurl) -lz
|
2010-06-29 11:20:12 +04:00
|
|
|
|
2013-04-08 20:50:55 +04:00
|
|
|
llcache_CFLAGS := $(shell pkg-config --cflags libparserutils libwapcaplet libdom) -O2
|
|
|
|
llcache_LDFLAGS := $(shell pkg-config --libs libparserutils libwapcaplet libdom)
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2011-10-15 01:29:13 +04:00
|
|
|
llcache_SRCS := content/fetch.c content/fetchers/curl.c \
|
|
|
|
content/fetchers/about.c content/fetchers/data.c \
|
|
|
|
content/fetchers/resource.c content/llcache.c \
|
2010-03-28 16:56:39 +04:00
|
|
|
content/urldb.c desktop/options.c desktop/version.c \
|
2011-10-15 01:29:13 +04:00
|
|
|
image/image_cache.c \
|
2013-04-08 20:50:55 +04:00
|
|
|
utils/base64.c utils/corestrings.c utils/hashtable.c \
|
|
|
|
utils/log.c utils/nsurl.c utils/messages.c utils/url.c \
|
|
|
|
utils/useragent.c utils/utils.c test/llcache.c
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2011-01-12 11:40:08 +03:00
|
|
|
urldbtest_SRCS := content/urldb.c utils/url.c utils/utils.c utils/log.c \
|
2012-10-05 22:30:13 +04:00
|
|
|
desktop/options.c utils/messages.c utils/hashtable.c \
|
2012-10-08 23:22:04 +04:00
|
|
|
utils/filename.c utils/nsurl.c utils/corestrings.c \
|
|
|
|
test/urldbtest.c
|
2010-06-29 11:20:12 +04:00
|
|
|
|
2012-10-08 23:22:04 +04:00
|
|
|
urldbtest_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom) -O2
|
|
|
|
urldbtest_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
|
2010-06-29 11:20:12 +04:00
|
|
|
|
2014-06-09 21:05:36 +04:00
|
|
|
nsurl_SRCS := utils/corestrings.c utils/log.c utils/nsurl.c utils/idna.c utils/utf8proc.c test/nsurl.c
|
2014-02-11 15:34:42 +04:00
|
|
|
nsurl_CFLAGS := $(shell pkg-config --cflags libwapcaplet libdom)
|
|
|
|
nsurl_LDFLAGS := $(shell pkg-config --libs libwapcaplet libdom)
|
2011-10-15 01:29:13 +04:00
|
|
|
|
2013-05-27 12:35:16 +04:00
|
|
|
nsoption_SRCS := utils/log.c utils/nsoption.c test/nsoption.c
|
|
|
|
nsoption_CFLAGS := -Dnsgtk
|
|
|
|
|
2010-06-29 11:20:12 +04:00
|
|
|
.PHONY: all
|
|
|
|
|
2013-05-27 12:35:16 +04:00
|
|
|
all: llcache urldbtest nsurl nsoption
|
2010-06-29 11:20:12 +04:00
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
llcache: $(addprefix ../,$(llcache_SRCS))
|
2010-06-29 11:20:12 +04:00
|
|
|
$(CC) $(CFLAGS) $(llcache_CFLAGS) $^ -o $@ $(LDFLAGS) $(llcache_LDFLAGS)
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2010-06-29 11:20:12 +04:00
|
|
|
urldbtest: $(addprefix ../,$(urldbtest_SRCS))
|
|
|
|
$(CC) $(CFLAGS) $(urldbtest_CFLAGS) $^ -o $@ $(LDFLAGS) $(urldbtest_LDFLAGS)
|
2010-03-28 16:56:39 +04:00
|
|
|
|
2011-10-15 01:29:13 +04:00
|
|
|
nsurl: $(addprefix ../,$(nsurl_SRCS))
|
|
|
|
$(CC) $(CFLAGS) $(nsurl_CFLAGS) $^ -o $@ $(LDFLAGS) $(nsurl_LDFLAGS)
|
|
|
|
|
2013-05-27 12:35:16 +04:00
|
|
|
nsoption: $(addprefix ../,$(nsoption_SRCS))
|
|
|
|
$(CC) $(CFLAGS) $(nsoption_CFLAGS) $^ -o $@ $(LDFLAGS) $(nsoption_LDFLAGS)
|
|
|
|
|
2010-03-28 16:56:39 +04:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2013-05-27 12:35:16 +04:00
|
|
|
$(RM) llcache urldbtest nsurl nsoption
|