2022-06-02 05:18:26 +00:00
|
|
|
|
2022-06-02 19:55:10 +00:00
|
|
|
GNUFLAGS=-Werror -Wall -Iinc -Icode
|
|
|
|
CLFLAGS=/I:inc /link /incremental:no /subsystem:windows /nodefaultlib kernel32.lib
|
2022-06-02 05:18:26 +00:00
|
|
|
|
|
|
|
CC=clang
|
|
|
|
CFLAGS=$(GNUFLAGS)
|
|
|
|
LDFLAGS=/nologo /nodefaultlib /entry:mainCRTStartup
|
|
|
|
|
|
|
|
SRC_DIR := code
|
|
|
|
OBJ_DIR := build
|
|
|
|
SRC_FILES := $(wildcard $(SRC_DIR)/*.c)
|
2022-06-02 19:55:10 +00:00
|
|
|
OBJ_FILES := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.obj,$(SRC_FILES))
|
2022-06-02 05:18:26 +00:00
|
|
|
|
|
|
|
ciabatta.lib: $(OBJ_FILES)
|
2022-06-02 19:55:10 +00:00
|
|
|
lib $(LDFLAGS) /out:$@ $^
|
2022-06-02 05:18:26 +00:00
|
|
|
|
2022-06-02 19:55:10 +00:00
|
|
|
$(OBJ_DIR)/%.obj: $(SRC_DIR)/%.c
|
2022-06-02 05:18:26 +00:00
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
.PHONY: ciabatta.lib
|