doc/examples/composition/files/libhello/Makefile
raw| 1 | # Sample makefile for hello library |
| 2 | # |
| 3 | .PHONY: all install |
| 4 | |
| 5 | all: libhello.so |
| 6 | |
| 7 | install: |
| 8 | install -d ${DESTDIR}${PREFIX}/lib |
| 9 | install -d ${DESTDIR}${PREFIX}/include |
| 10 | install -m 644 libhello.so ${DESTDIR}${PREFIX}/lib |
| 11 | install -m 644 libhello.h ${DESTDIR}${PREFIX}/include |
| 12 | |
| 13 | %.o: %.c %.h |
| 14 | $(CC) -c $< -o $@ -Wall |
| 15 | |
| 16 | libhello.so: libhello.o |
| 17 | $(CC) -shared -o $@ $< |