I have cleaned up Makefile.
PROG = openxcom
SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o)
CXXFLAGS = -Wall -O2 `sdl-config --cflags`
LDFLAGS = `sdl-config --libs` -lSDL_gfx -lSDL_mixer
$(PROG): $(OBJS)
$(CXX) $(LDFLAGS) -o $(PROG) $(OBJS)
clean:
rm -f $(PROG) *.o
.PHONY: clean
Current Makefile uses $(CC) instead of $(CXX). CC is a *C* compiler, not C++. C++ compiler is CXX. You have rule for "openxcom" but instead you build "OpenXcom". Names are case-sensitive on Linux. You have also wrote your own implicit rule, don't know why. And `sdl-config --cflags`should not be in $(LIBS) BTW.