This commit is contained in:
Wolfgang Hottgenroth 2021-02-08 15:04:12 +01:00
parent 96d59853ca
commit c2549c51eb
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -13,6 +13,7 @@ LDFLAGS =
TARGET = sink20169
all: $(BUILD_DIR)/$(TARGET)
OBJECTS = $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
vpath %.c $(sort $(dir $(C_SOURCES)))
@ -21,3 +22,10 @@ $(BUILD_DIR)/%.o: %.c Makefile | $(BUILD_DIR)
$(BUILD_DIR)/$(TARGET): $(OBJECTS) Makefile
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
$(BUILD_DIR):
mkdir $@
.phony: clean
clean:
-rm -rf $(BUILD_DIR)