Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed target clean #6

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
main
tags
*.o
*.exe
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ SOURCES := main.c renderer.c microui.c
OBJECTS := $(SOURCES:%.c=%.o)
DEPS := $(SOURCES:%.c=%.d)
CFLAGS += -MMD
TARGET = native
MAIN = main

main: $(OBJECTS)
$(MAIN): $(OBJECTS)
$(CC) -o $(MAIN) $(OBJECTS) $(LDLIBS)

-include $(DEPS)

ifeq ($(OS),Windows_NT)
MAIN = main.exe
LDLIBS += -lgdi32
else ifeq ($(TARGET), mingw)
MAIN = main.exe
export CC = x86_64-w64-mingw32-gcc
LDLIBS += -lgdi32
else
UNAME_S := $(shell uname -s)
Expand All @@ -21,6 +29,6 @@ else
endif

clean:
rm -f main $(OBJECTS) $(DEPS)
rm -f main main.exe $(OBJECTS) $(DEPS)

.PHONY: clean