Makefile 689 B

1234567891011121314151617181920212223
  1. CC=gcc
  2. WARNINGS := -Wall -Wextra -pedantic -Wshadow -Wpointer-arith -Wcast-align \
  3. -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations \
  4. -Wredundant-decls -Wnested-externs -Winline -Wno-long-long \
  5. -Wuninitialized -Wconversion -Wstrict-prototypes
  6. CFLAGS := -g -O -std=c99 $(WARNINGS)
  7. OBJ = posix_lock.o other.o block_header.o sys_alloc.o dmm_init.o coalesce.o dmm_adaptor.o custom_malloc.o custom_free.o
  8. %.o: %.c
  9. $(CC) -c -o $@ $< $(CFLAGS)
  10. test: $(OBJ) test.o
  11. $(CC) -pthread -o $@ $^ $(CFLAGS)
  12. larson: $(OBJ) larson.o
  13. $(CC) -pthread -o $@ $^ $(CFLAGS)
  14. clean:
  15. -@$(RM) $(wildcard $(OBJ)) test.o larson.o test larson
  16. .PHONY: all clean test