Set version to 0.2
[qi-bootmenu/guyou.git] / Makefile
blob5b9371f3cf7512c6b4e852feed419ccebfe2588f
1 include config.mk
3 SRC += qi-bootmenu.c fstype/fstype.c
4 OBJ = ${SRC:.c=.o}
6 all: clean options qi-bootmenu
8 options:
9 @echo qi-bootmenu build options:
10 @echo "CFLAGS = ${CFLAGS}"
11 @echo "LDFLAGS = ${LDFLAGS} ${LIBS}"
12 @echo "CC = ${CC}"
14 .c.o:
15 @echo CC $<
16 @${CC} ${CFLAGS} -c $< -o $@
18 ${OBJ}: config.h config.mk
20 qi-bootmenu: ${OBJ}
21 @echo CC -o $@
22 @${CC} ${LDFLAGS} ${LIBS} ${OBJ} -o $@
24 debug:
25 @make CFLAGS='${DEBUG_CFLAGS}'
27 static:
28 LDFLAGS='${LDFLAGS_STATIC} ${LDFLAGS}' PKG_CONFIG_FLAGS='${PKG_CONFIG_STATIC_FLAGS}' make
30 static_debug:
31 @make static CFLAGS='${DEBUG_CFLAGS}'
33 clean:
34 @echo cleaning
35 @rm -f qi-bootmenu ${OBJ} qi-bootmenu-${VERSION}.tar.gz
37 dist: clean
38 @echo creating dist tarball
39 @mkdir -p qi-bootmenu-${VERSION}
40 @cp -r Makefile config.h config.mk qi-bootmenu.c gui.c \
41 gui-*.c kexec.c fstype data \
42 qi-bootmenu-${VERSION}
43 @tar -cf qi-bootmenu-${VERSION}.tar qi-bootmenu-${VERSION}
44 @gzip qi-bootmenu-${VERSION}.tar
45 @rm -rf qi-bootmenu-${VERSION}
47 install: qi-bootmenu
48 @echo installing executable file to ${DESTDIR}${PREFIX}/sbin
49 @mkdir -p ${DESTDIR}${PREFIX}/sbin
50 @cp -f qi-bootmenu ${DESTDIR}${PREFIX}/sbin
51 @chmod 755 ${DESTDIR}${PREFIX}/sbin/qi-bootmenu
52 @mkdir -p ${DESTDIR}${DATADIR}
53 @cp -r data/* ${DESTDIR}${DATADIR}
55 uninstall:
56 @echo removing executable file from ${DESTDIR}${PREFIX}/sbin
57 @rm -f ${DESTDIR}${PREFIX}/sbin/qi-bootmenu
59 .PHONY: all options clean dist install uninstall debug static