2 P_C_SRCS := $(wildcard *.c)
3 P_C_OBJS := ${P_C_SRCS:.c=.o}
4 P_INCLUDE_DIRS := ../inc
5 P_LIBRARY_DIRS := ../src
6 P_LIBRARIES := clibutils
7 CPPFLAGS += $(foreach includedir,$(P_INCLUDE_DIRS),-I$(includedir))
8 LDFLAGS += $(foreach librarydir,$(P_LIBRARY_DIRS),-L$(librarydir))
9 LDFLAGS += $(foreach library,$(P_LIBRARIES),-l$(library))
15 $(P_NAME): $(P_C_OBJS)
16 $(CC) $(CCFLAGS) $(P_C_OBJS) -o $(P_NAME) $(LDFLAGS)