move button-release callback into widgets/common.c
[luakit.git] / Makefile
blob7663dbc7c558121d5e1ebb20908b0ad07ec9aea3
1 # Include makefile config
2 include config.mk
4 # Token lib generation
5 GPERF = common/tokenize.gperf
6 GSRC = common/tokenize.c
7 GHEAD = common/tokenize.h
9 SRCS = $(filter-out ${GSRC},$(wildcard *.c) $(wildcard common/*.c) $(wildcard widgets/*.c)) ${GSRC}
10 HEADS = $(filter-out ${GHEAD},$(wildcard *.h) $(wildcard common/*.h) $(wildcard widgets/*.h)) ${GHEAD}
11 OBJS = $(foreach obj,$(SRCS:.c=.o),$(obj))
13 all: options newline luakit
15 options:
16 @echo luakit build options:
17 @echo "CC = ${CC}"
18 @echo "CFLAGS = ${CFLAGS}"
19 @echo "CPPFLAGS = ${CPPFLAGS}"
20 @echo "LDFLAGS = ${LDFLAGS}"
21 @echo "INSTALLDIR = ${INSTALLDIR}"
22 @echo "MANPREFIX = ${MANPREFIX}"
23 @echo "DOCDIR = ${DOCDIR}"
24 @echo
25 @echo build targets:
26 @echo "SRCS = ${SRCS}"
27 @echo "HEADS = ${HEADS}"
28 @echo "OBJS = ${OBJS}"
30 ${GSRC} ${GHEAD}: ${GPERF}
31 ./build-utils/gperf.sh $< $@
33 .c.o:
34 @echo ${CC} -c $< -o $@
35 @${CC} -c ${CFLAGS} ${CPPFLAGS} $< -o $@
37 globalconf.h: globalconf.h.in
38 sed 's#LUAKIT_INSTALL_PATH .*#LUAKIT_INSTALL_PATH "$(PREFIX)/share/luakit"#' globalconf.h.in > globalconf.h
40 ${OBJS}: ${HEADS} config.mk globalconf.h
42 luakit: ${OBJS}
43 @echo ${CC} -o $@ ${OBJS}
44 @${CC} -o $@ ${OBJS} ${LDFLAGS}
46 clean:
47 rm -rf luakit ${OBJS} ${GSRC} ${GHEAD} globalconf.h
49 install:
50 install -d $(INSTALLDIR)/share/luakit/
51 install -d $(DOCDIR)
52 install -m644 README.md AUTHORS COPYING* $(DOCDIR)
53 cp -r lib/ $(INSTALLDIR)/share/luakit/
54 chmod -R 755 $(INSTALLDIR)/share/luakit/lib/
55 cp -r scripts/ $(INSTALLDIR)/share/luakit/
56 chmod -R 755 $(INSTALLDIR)/share/luakit/scripts/
57 install -D luakit $(INSTALLDIR)/bin/luakit
58 install -d $(DESTDIR)/etc/xdg/luakit/
59 install -D rc.lua $(DESTDIR)/etc/xdg/luakit/rc.lua
61 uninstall:
62 rm -rf $(INSTALLDIR)/bin/luakit $(INSTALLDIR)/share/luakit
64 newline:;@echo
65 .PHONY: all clean options install newline