.POSIX: target = libqstd.a includes = -I../qstd defines = -Dplat_x86 -Dplat_posix -Dallocation_default_alignment=8 cflags = -std=gnu90 -pedantic -Wall -Wextra $(DEBUG_COMPILE_FLAG) $(includes) $(defines) lflags = $(DEBUG_LINK_FLAG) objects = plat.o memory.o str.o pack.o .PHONY: all clean all: $(target) memory.o: memory.c memory.h plat.h $(CC) -c $(cflags) memory.c -o memory.o plat.o: plat.c plat.h $(CC) -c $(cflags) plat.c -o plat.o str.o: str.c str.h memory.h $(CC) -c $(cflags) str.c -o str.o pack.o: pack.c pack.h str.h plat.h memory.h $(CC) -c $(cflags) pack.c -o pack.o $(target): $(objects) $(AR) -rcs $(target) $(objects) clean: rm -f $(target) rm -f $(objects)