Skip to content

Commit c487b4d

Browse files
AMDmi3DusteD
authored andcommitted
Fix Makefile
- Compile with CXX, as this is c++ code - Don't override user-set CXX - Place DATADIR define to CXXFLAGS where it belongs
1 parent db436e0 commit c487b4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ BINDIR=bin/
99

1010
#append -DWITH_WIIUSE to compile with WIIUSE support!
1111
#append -DNOSOUND to compile WITHOUT sound support
12-
CC=g++ -DDATADIR="\"$(DATADIR)\""
1312
STRIP=strip
13+
CXX?=g++
1414

15-
CFLAGS+=-c -Wall `sdl-config --cflags`
15+
CXXFLAGS+=-Wall `sdl-config --cflags` -DDATADIR="\"$(DATADIR)\""
1616

1717
#append -lwiiuse to compile with WIIUSE support
1818
#remove -lSDL_mixer if compiling with -DNOSOUND
@@ -26,11 +26,11 @@ EXECUTABLE=sdl-ball
2626
all: $(SOURCES) $(EXECUTABLE)
2727

2828
$(EXECUTABLE): $(OBJECTS)
29-
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
29+
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
3030
$(STRIP) $@
3131

3232
.cpp.o:
33-
$(CC) $(CFLAGS) $< -o $@
33+
$(CXX) -c $(CXXFLAGS) $< -o $@
3434

3535
clean:
3636
rm -f *.o sdl-ball

0 commit comments

Comments
 (0)