mirror of
https://github.com/StepanovPlaton/C3DGraphicEngine.git
synced 2026-04-03 20:30:42 +04:00
Initial commit
This commit is contained in:
29
Makefile
Normal file
29
Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
CC = gcc
|
||||
CFLAGS = -std=gnu23 -Wall -Wextra
|
||||
LIBS = -lgdi32
|
||||
|
||||
TARGET = main.exe
|
||||
SOURCES = main.c utils/utils.c
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CC) -o $@ $^ $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
@if command -v rm >/dev/null 2>&1; then \
|
||||
rm -f $(TARGET) main.o utils/utils.o; \
|
||||
else \
|
||||
powershell -Command "Remove-Item -ErrorAction SilentlyContinue '$(TARGET)', 'main.o', 'utils/utils.o'"; \
|
||||
fi
|
||||
|
||||
rebuild: clean all
|
||||
|
||||
run: $(TARGET)
|
||||
.\$(TARGET)
|
||||
|
||||
.PHONY: all clean rebuild run
|
||||
Reference in New Issue
Block a user