-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (28 loc) · 1.19 KB
/
Makefile
File metadata and controls
33 lines (28 loc) · 1.19 KB
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
29
30
31
32
33
#Инструкции как да конфигурираме Visual Studio
#и SDL2 може да видите във файла sdl2-windows-instructions.md
#
#За Linux & Mac OS ползвайте приложения Makefile.
#
#И в двата случая е необходимо първо да
#инсталирате SDL2, SDL2_image и SDL2_ttf
CXX = clang++
#Изпползваййте sdl2-config --cflags, за да намерите къде е инсталиран
#SDL2 и коригирайте тези два реда съответно
SDL = -L/opt/homebrew/lib -lSDL2 -lSDL2_image -lSDL2_ttf
CXXFLAGS = -Wall -c -std=c++11 -I/opt/homebrew/include -D_THREAD_SAFE
# If your compiler is a bit older you may need to change -std=c++11 to -std=c++0x
LDFLAGS = $(SDL)
DEPS = $(wildcard *.h)
OBJS = $(patsubst %.cpp,$(builddir)%.o,$(wildcard *.cpp)) $(patsubst cpppainter/%.cpp,$(builddir)%.o,$(wildcard cpppainter/*.cpp))
builddir = build/
all: draw
draw: $(OBJS)
$(CXX) $(LDFLAGS) $(OBJS) -o $(builddir)$@
$(builddir)%.o: %.cpp $(DEPS)
@mkdir -p $(@D)
@$(CXX) -c -o $@ $< $(CXXFLAGS)
$(builddir)%.o: cpppainter/%.cpp $(DEPS)
@mkdir -p $(@D)
@$(CXX) -c -o $@ $< $(CXXFLAGS)
clean:
rm -r build