1 # Include makefile config
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
16 @echo luakit build options
:
18 @echo
"CFLAGS = ${CFLAGS}"
19 @echo
"CPPFLAGS = ${CPPFLAGS}"
20 @echo
"LDFLAGS = ${LDFLAGS}"
21 @echo
"INSTALLDIR = ${INSTALLDIR}"
22 @echo
"MANPREFIX = ${MANPREFIX}"
23 @echo
"DOCDIR = ${DOCDIR}"
26 @echo
"SRCS = ${SRCS}"
27 @echo
"HEADS = ${HEADS}"
28 @echo
"OBJS = ${OBJS}"
30 ${GSRC} ${GHEAD}: ${GPERF}
31 .
/build-utils
/gperf.sh
$< $@
34 @echo
${CC} -c
$< -o
$@
35 @
${CC} -c
${CFLAGS} ${CPPFLAGS} $< -o
$@
37 globalconf.h
: globalconf.h.in
38 sed
's#LUAKIT_LUA_LIB_PATH .*#LUAKIT_LUA_LIB_PATH "$(PREFIX)/share/luakit/lib"#' globalconf.h.in
> globalconf.h
40 ${OBJS}: ${HEADS} config.mk globalconf.h
43 @echo
${CC} -o
$@
${OBJS}
44 @
${CC} -o
$@
${OBJS} ${LDFLAGS}
47 rm -rf luakit
${OBJS} ${GSRC} ${GHEAD} globalconf.h
50 install -d
$(INSTALLDIR
)/share
/luakit
/
52 install -m644 README.md AUTHORS COPYING
* $(DOCDIR
)
53 cp
-r lib
/ $(INSTALLDIR
)/share
/luakit
/
54 chmod
-R
755 $(INSTALLDIR
)/share
/luakit
/lib
/
55 install -D luakit
$(INSTALLDIR
)/bin
/luakit
56 install -d
$(DESTDIR
)/etc
/xdg
/luakit
/
57 install -D rc.lua
$(DESTDIR
)/etc
/xdg
/luakit
/rc.lua
60 rm -rf
$(INSTALLDIR
)/bin
/luakit
$(INSTALLDIR
)/share
/luakit
63 .PHONY
: all clean options
install newline