gear-tools/Makefile
2024-09-12 18:21:08 +12:00

24 lines
483 B
Makefile

GMAPC=gmc-bin
CFLAGS=-I. -Iinclude -Wall -Wextra -Werror -Wno-header-guard -Wno-comment -Wno-unused-parameter -Wno-unused-function -Ofast
GMC_C_FILES=$(shell find -L src/gmc -type f -name '*.c')
GMC_C_OBJ=$(GMC_C_FILES:.c=.o)
ifeq ($(OS), Windows_NT)
BINARY := $(BINARY).exe
endif
.PHONY: clean bear
$(GMAPC): $(GMC_C_OBJ)
$(CC) $(GMC_C_OBJ) $(LDFLAGS) -o $@
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS)
bear: clean
bear -- $(MAKE) $(BINARY)
clean:
rm -rf $(GMC_C_OBJ) $(GMAPC)