TETRIS: fix compilation on linux

This commit is contained in:
zvon 2020-11-22 22:01:20 +01:00
parent afc836902b
commit 5f40ffe4e1

View File

@ -13,18 +13,16 @@ TETRIS_OBJECTS = tetris.o scenes.o config.o functions.o global_vars.o
ifeq ($(UNAME_S),Linux)
TETRIS_OBJECTS += libsdlpp.so
SDLLIB = libsdlpp
endif
ifeq ($(UNAME_S),Darwin)
TETRIS_OBJECTS += libsdlpp.dylib
SDLLIB = sdlpp
endif
.PHONY: default
default: tetris
tetris: ${TETRIS_OBJECTS}
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS} -L $(shell pwd) -l${SDLLIB}
$(CXX) $(CFLAGS) -o $@ $^ ${LDFLAGS} -L $(shell pwd) -lsdlpp
tetris.o: tetris.cpp ../sdlpp/sdlpp.hpp config.hpp custom_classes.hpp scenes.hpp global_vars.hpp functions.hpp
$(CXX) $(CFLAGS) -c -o $@ $<