| 1 | # Comment next 2 line to disable Linux inotify support. |
| 2 | INOTIFY = -DINOTIFY |
| 3 | INOTIFY_SOURCE = ino.c |
| 4 | CFLAGS = -Wall -pedantic -ansi ${INOTIFY} $$(pkg-config --cflags glib-2.0) -g #-O2 |
| 5 | LDFLAGS = -lncursesw $$(pkg-config --libs glib-2.0) #-s |
| 6 | PREFIX = /usr/local |
| 7 | SOURCES = fm.c fs.c ui.c cmd.c ${INOTIFY_SOURCE} |
| 8 | HEADERS = fm.h |
| 9 | OBJECTS = ${SOURCES:.c=.o} |
| 10 | BINARY = fm |
| 11 | |
| 12 | all: ${BINARY} |
| 13 | |
| 14 | ${BINARY}: ${OBJECTS} |
| 15 | ${CC} ${LDFLAGS} -o ${BINARY} ${OBJECTS} |
| 16 | |
| 17 | ${OBJECTS}: ${HEADERS} |
| 18 | |
| 19 | tags: ${SOURCES} ${HEADERS} |
| 20 | ctags ${SOURCES} ${HEADERS} |
| 21 | |
| 22 | install: all |
| 23 | install -D -m 755 -o root -g root ${BINARY} ${DESTDIR}/${PREFIX}/bin/${BINARY} |
| 24 | |
| 25 | uninstall: |
| 26 | rm -f ${PREFIX}/bin/${BINARY} |
| 27 | |
| 28 | clean: |
| 29 | rm -f ${BINARY} *.o tags |