| •1 |
# This is a makefile to build "test_libpd". |
| 2 |
SRC_FILES = test_libpd.c |
| 3 |
TARGET = test_libpd |
| 4 |
|
| •5 |
.PHONY: all |
| 6 |
all: $(TARGET) |
| 7 |
|
| 8 |
# force static linking? make STATIC=true |
| 9 |
ifeq ($(STATIC), true) |
| •10 |
LDFLAGS += -l:libpd.a -lm |
| 11 |
else # copy libpd to here by default |
| •12 |
LDFLAGS += -lpd |
| 13 |
endif |
| 14 |
|
| •15 |
LDFLAGS += -lc |
| 16 |
CPPFLAGS += -I/usr/include/pd |
| 17 |
|
| 18 |
##### target |
| 19 |
|
| •20 |
$(TARGET): ${SRC_FILES:.c=.o} |
| 21 |
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) |
| 22 |
|
| 23 |
##### clean |
| 24 |
|
| •25 |
.PHONY: clean |
| 26 |
clean: |
| 27 |
rm -f $(TARGET) *.o |