doc/examples/filtering/files/hello/Makefile
raw| 1 | # Sample makefile for hello.c |
| 2 | # |
| 3 | .PHONY: all install |
| 4 | |
| 5 | all: hello |
| 6 | |
| 7 | install: |
| 8 | install -d ${DESTDIR}${PREFIX}/bin |
| 9 | install -m 755 hello ${DESTDIR}${PREFIX}/bin |
| 10 | |
| 11 | hello: hello.c |
| 12 | extra_flags=""; \ |
| 13 | if [ -f "${PREFIX}/share/libhello/default-person.txt" ]; then \ |
| 14 | extra_flags=-DDEFAULT_PERSON="\"$$(cat ${PREFIX}/share/libhello/default-person.txt)\""; \ |
| 15 | fi; \ |
| 16 | $(CC) $< -o $@ $${extra_flags} -Wall -lhello |