rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | TARGET := libdtmf.so |
| 2 | SOURCES := dtmf.c |
| 3 | OBJECTS := $(SOURCES:.c=.o) |
| 4 | |
| 5 | GET_LOCAL_DIR = $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) |
| 6 | |
| 7 | .PHONY: all clean install |
| 8 | |
| 9 | all: $(TARGET) |
| 10 | |
| 11 | $(TARGET): $(OBJECTS) |
| 12 | ${CC} ${CFLAGS} -shared -fPIC -o ${TARGET} ${SOURCES} |
| 13 | |
| 14 | clean: |
| 15 | $(RM) $(OBJECTS) $(TARGET) |
| 16 | |
| 17 | install: $(TARGET) |
| 18 | install -d ${DESTDIR}${LIBDIR} |
| 19 | install -d ${DESTDIR}${INCDIR} |
| 20 | install -m 755 ${TARGET} $(DESTDIR)${LIBDIR}/${TARGET} |
| 21 | install -m 444 *.h $(DESTDIR)${INCDIR}/ |