diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -3,10 +3,10 @@ | |||
3 | 3 | ||
4 | include config.mk | 4 | include config.mk |
5 | 5 | ||
6 | SRC = dmenu.c draw.c | 6 | SRC = dmenu.c draw.c lsx.c |
7 | OBJ = ${SRC:.c=.o} | 7 | OBJ = ${SRC:.c=.o} |
8 | 8 | ||
9 | all: options dmenu | 9 | all: options dmenu lsx |
10 | 10 | ||
11 | options: | 11 | options: |
12 | @echo dmenu build options: | 12 | @echo dmenu build options: |
@@ -20,9 +20,13 @@ options: | |||
20 | 20 | ||
21 | ${OBJ}: config.mk | 21 | ${OBJ}: config.mk |
22 | 22 | ||
23 | dmenu: ${OBJ} | 23 | dmenu: dmenu.o draw.o |
24 | @echo CC -o $@ | 24 | @echo CC -o $@ |
25 | @${CC} -o $@ ${OBJ} ${LDFLAGS} | 25 | @${CC} -o $@ dmenu.o draw.o ${LDFLAGS} |
26 | |||
27 | lsx: lsx.o | ||
28 | @echo CC -o $@ | ||
29 | @${CC} -o $@ lsx.o ${LDFLAGS} | ||
26 | 30 | ||
27 | clean: | 31 | clean: |
28 | @echo cleaning | 32 | @echo cleaning |
@@ -39,21 +43,26 @@ dist: clean | |||
39 | install: all | 43 | install: all |
40 | @echo installing executables to ${DESTDIR}${PREFIX}/bin | 44 | @echo installing executables to ${DESTDIR}${PREFIX}/bin |
41 | @mkdir -p ${DESTDIR}${PREFIX}/bin | 45 | @mkdir -p ${DESTDIR}${PREFIX}/bin |
42 | @cp -f dmenu dmenu_path dmenu_run ${DESTDIR}${PREFIX}/bin | 46 | @cp -f dmenu dmenu_path dmenu_run lsx ${DESTDIR}${PREFIX}/bin |
43 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu | 47 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu |
44 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path | 48 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path |
45 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run | 49 | @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run |
46 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 | 50 | @chmod 755 ${DESTDIR}${PREFIX}/bin/lsx |
51 | @echo installing manual pages to ${DESTDIR}${MANPREFIX}/man1 | ||
47 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 | 52 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 |
48 | @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1 | 53 | @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1 |
54 | @sed "s/VERSION/${VERSION}/g" < lsx.1 > ${DESTDIR}${MANPREFIX}/man1/lsx.1 | ||
49 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1 | 55 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1 |
56 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/lsx.1 | ||
50 | 57 | ||
51 | uninstall: | 58 | uninstall: |
52 | @echo removing executables from ${DESTDIR}${PREFIX}/bin | 59 | @echo removing executables from ${DESTDIR}${PREFIX}/bin |
53 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu | 60 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu |
54 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_path | 61 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_path |
55 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_run | 62 | @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_run |
63 | @rm -f ${DESTDIR}${PREFIX}/bin/lsx | ||
56 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 | 64 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 |
57 | @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1 | 65 | @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1 |
66 | @rm -f ${DESTDIR}${MANPREFIX}/man1/lsx.1 | ||
58 | 67 | ||
59 | .PHONY: all options clean dist install uninstall | 68 | .PHONY: all options clean dist install uninstall |