# All header files of the project
HDRFILES := $(shell find $(PROJDIRS) -mindepth 1 -maxdepth 3 -name "*.h")
# All .c files in functions/_PDCLIB that do not have a regression test driver
# All header files of the project
HDRFILES := $(shell find $(PROJDIRS) -mindepth 1 -maxdepth 3 -name "*.h")
# All .c files in functions/_PDCLIB that do not have a regression test driver
# All object files in the library
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
# All test drivers (.t)
# All object files in the library
OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
# All test drivers (.t)
# All files in platform/example/functions/stdlib (for development only)
PATCHFILES2 := $(shell ls platform/example/functions/stdlib/*.c)
# All files in platform/example/functions/stdlib (for development only)
PATCHFILES2 := $(shell ls platform/example/functions/stdlib/*.c)
@echo "all - build pdclib.a"
@echo "clean - remove all object files, dependency files and test drivers"
@echo "dist - build pdclib.tgz (source tarball)"
@echo "all - build pdclib.a"
@echo "clean - remove all object files, dependency files and test drivers"
@echo "dist - build pdclib.tgz (source tarball)"
@echo "tests - build and run test drivers (link pdclib.a)"
@echo " testdrivers - build but do not run test drivers"
@echo "regtests - build and run regression test drivers (link system clib)"
@echo "tests - build and run test drivers (link pdclib.a)"
@echo " testdrivers - build but do not run test drivers"
@echo "regtests - build and run regression test drivers (link system clib)"
@$(CC) $(CFLAGS) -DNDEBUG -MMD -MP -MT "$*.d $*.t" -g -std=c99 -I./includes -I./internals -c $< -o $@
%.t: %.c Makefile pdclib.a
@$(CC) $(CFLAGS) -DNDEBUG -MMD -MP -MT "$*.d $*.t" -g -std=c99 -I./includes -I./internals -c $< -o $@
%.t: %.c Makefile pdclib.a
- @echo " CC $@"
- @$(CC) $(CFLAGS) -DTEST -std=c99 -I./includes -I./internals $< pdclib.a -o $@
+ @echo " CC $(patsubst functions/%,%,$@)"
+ @$(CC) $(CFLAGS) -DTEST -g -std=c99 -I./includes -I./internals $< pdclib.a -o $@