forked from kuroni/bongocat-osu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
28 lines (22 loc) · 821 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
SRCDIR := src
OBJDIR := obj
ICODIR := ico
SRC := $(wildcard $(SRCDIR)/*.cpp)
OBJ := $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRC))
ICO := $(ICODIR)/ico.res
CXXFLAGS := -std=c++17 -s -O2 -mwindows
LDFLAGS := -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lfreetype -lwinmm -lgdi32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic
INCFLAGS := -I/<SFML-folder>/include -Iinclude
LIBFLAGS := -L/<SFML-folder>/lib
DEFINES := -DSFML_STATIC
.PHONY: test clean
bin/bongo.exe: $(OBJ) $(ICO)
$(CXX) -o $@ $^ $(DEFINES) $(INCFLAGS) $(LIBFLAGS) $(CXXFLAGS) $(LDFLAGS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) -c -o $@ $^ $(DEFINES) $(INCFLAGS) $(LIBFLAGS) $(CXXFLAGS) $(LDFLAGS)
$(ICODIR)/ico.res: $(ICODIR)/ico.rc
windres -O coff -o $@ $^
test:
bin/bongo.exe
clean:
rm $(OBJ)