| 1 |
# Makefile for liquid-dsp pre-compiled tables and constants |
| 2 |
|
| 3 |
all: |
| 4 |
|
| 5 |
CFLAGS := -I include -g -O2 -Wall |
| 6 |
LDFLAGS := |
| 7 |
LIBS := -lm -lc -lliquid |
| 8 |
|
| 9 |
.PHONY: gentab |
| 10 |
gentab_programs = \ |
| 11 |
gentab/count_ones_gentab \ |
| 12 |
gentab/firfilt_gentab \ |
| 13 |
|
| 14 |
gentab_objects = $(patsubst %,%.o,$(gentab_programs)) |
| 15 |
gentab: $(gentab_programs) |
| 16 |
|
| 17 |
# NOTE: linked libraries must come _after_ the target program |
| 18 |
$(gentab_objects): %.o : %.c |
| 19 |
|
| 20 |
$(gentab_programs): % : %.o ${ARCHIVE_LIB} |
| 21 |
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LIBS) |
| 22 |
|
| 23 |
# clean gentab binaries |
| 24 |
clean: |
| 25 |
$(RM) gentab/*.o |
| 26 |
$(RM) $(gentab_programs) |
| 27 |
|
| 28 |
run: $(gentab_programs) |
| 29 |
./gentab/count_ones_gentab > src/utility/src/count_ones.c |
| 30 |
|
| 31 |
all: run |
| 32 |
|
| 33 |
|