blob: bc7763bf492e00ae77f421f5a93f7fc6c6d08d2f (
plain)
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
34
35
36
37
38
|
--- a/makefile
+++ b/makefile
@@ -48,7 +47,7 @@
LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -pg
else
CFLAGS = -MMD -O3 -march=$(MARCH) -Wall $(SDL_FLAGS)
-LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -s
+LDLIBS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU -lm
endif
endif
@@ -58,7 +57,7 @@
OBJS := $(subst src/,obj/,$(OBJS))
# Include directories
-INCLUDES = -I./include
+INCLUDES = -I./include $(SDL_FLAGS)
# Targets
@@ -69,7 +68,7 @@
-include $(DEPS)
$(TARGET): $(OBJS)
- $(CC) -o $(TARGET) $(OBJS) $(LDFLAGS)
+ $(CXX) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LDLIBS)
clean:
rm -f $(OBJS) $(TARGET)
@@ -80,7 +79,7 @@
rebuild: veryclean all
obj/%.o: src/%.cpp
- $(CC) $(CFLAGS) $(INCLUDES) $(DIR_DEFINES) -c $< -o $@
+ $(CXX) $(CXXFLAGS) $(INCLUDES) $(DIR_DEFINES) -c $< -o $@
# Compress the exe with UPX
compress: $(TARGET)
|