123456789101112131415161718192021222324252627 |
- CPPFLAGS=-Wall -Wno-misleading-indentation -Werror --std=c++1z -O3 -flto
- LDFLAGS=
- INCLUDES=-I../pge/include
- EXECUTABLE=packer
- ifeq ($(OS),Windows_NT)
- LIBRARIES=-luser32 -lgdi32 -lgdiplus
- EXECUTABLE+=.exe
- CPP=i686-w64-mingw32-g++
- CC=i686-w64-mingw32-gcc
- else
- LIBRARIES=-lpng
- CC=gcc
- CPP=g++
- endif
- SOURCES=packer.cpp ../pge/src/olcPGE_ResourcePack.cpp ../pge/src/olcPGE_Sprite.cpp ../pge/src/olcPGE_Pixel.cpp
- OBJECTS=$(SOURCES:.cpp=.o)
-
- all: $(SOURCES) $(EXECUTABLE)
-
- clean:
- $(RM) $(OBJECTS) $(EXECUTABLE)
-
- $(EXECUTABLE): $(OBJECTS)
- $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
-
- .cpp.o:
- $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
|