LibHashSet/test/hash-set/Makefile
2022-12-01 16:47:11 +01:00

28 lines
582 B
Makefile

include ../../config.mk
CFLAGS = -std=c99 -D_DEFAULT_SOURCE -Wpedantic -I../../libhashset/include -I../shared/include $(XCFLAGS)
LDFLAGS = -L../../libhashset/lib -lhashset-1 $(XLDFLAGS)
SRC_PATH := src
BIN_PATH := bin
ALL_PATH := $(SRC_PATH) $(BIN_PATH)
BIN_FILE := $(BIN_PATH)/test-hash-set$(EXE_SUFFIX)
SRC_FILE := $(wildcard $(SRC_PATH)/*.c) $(wildcard ../shared/src/*.c)
.PHONY: all clean test
all: clean $(ALL_PATH) $(BIN_FILE)
$(BIN_FILE): $(SRC_FILE)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(ALL_PATH):
mkdir -p $@
test: all
./$(BIN_FILE)
clean:
rm -vf $(BIN_FILE)