Skip to content

Commit

Permalink
Fix Makefile
Browse files Browse the repository at this point in the history
- Compile with CXX, as this is c++ code
- Don't override user-set CXX
- Place DATADIR define to CXXFLAGS where it belongs
  • Loading branch information
AMDmi3 authored and DusteD committed Apr 7, 2020
1 parent db436e0 commit c487b4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ BINDIR=bin/

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

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

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

$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
$(CXX) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
$(STRIP) $@

.cpp.o:
$(CC) $(CFLAGS) $< -o $@
$(CXX) -c $(CXXFLAGS) $< -o $@

clean:
rm -f *.o sdl-ball
Expand Down

0 comments on commit c487b4d

Please sign in to comment.