LibHashSet/example/hash-set/Makefile

25 lines
520 B
Makefile
Raw Normal View History

2022-11-30 16:15:12 +01:00
include ../../config.mk
CFLAGS = -std=c99 -D_DEFAULT_SOURCE -Wall -Wpedantic -I../../libhashset/include $(XCFLAGS)
2022-11-30 16:15:12 +01:00
LDFLAGS = -L../../libhashset/lib -lhashset-1 $(XLDFLAGS)
SRC_PATH := src
BIN_PATH := bin
ALL_PATH := $(SRC_PATH) $(BIN_PATH)
2022-11-30 15:41:29 +01:00
BIN_FILE := $(BIN_PATH)/example-hash-set$(EXE_SUFFIX)
SRC_FILE := $(wildcard $(SRC_PATH)/*.c)
2022-11-30 21:04:36 +01:00
.PHONY: all clean test
2022-11-30 21:04:36 +01:00
all test: clean $(ALL_PATH) $(BIN_FILE)
2022-11-30 16:15:12 +01:00
$(BIN_FILE): $(SRC_FILE)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
$(ALL_PATH):
mkdir -p $@
clean:
2022-11-30 16:15:12 +01:00
rm -vf $(BIN_FILE)