No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 840B

1234567891011121314151617181920212223242526272829303132333435
  1. # To compile this you will need MinGW with MSYS installed in PATH
  2. CPPFLAGS=-Wall -Wno-misleading-indentation -Werror --std=c++1z -g -flto
  3. LDFLAGS=
  4. INCLUDES=-Ipge/include
  5. EXECUTABLE=awoorwae
  6. ifeq ($(OS),Windows_NT)
  7. LIBRARIES=-luser32 -lgdi32 -lopengl32 -lgdiplus -lwinmm
  8. EXECUTABLE+=.exe
  9. LDFLAGS+=--machine=windows
  10. CPP=i686-w64-mingw32-g++
  11. CC=i686-w64-mingw32-gcc
  12. else
  13. LIBRARIES=-lX11 -lGL -lpthread -lpng -lasound
  14. CC=gcc
  15. CPP=g++
  16. endif
  17. SOURCES=$(wildcard src/*.cpp) $(wildcard src/**/*.cpp) $(wildcard pge/src/*.cpp)
  18. OBJECTS=$(SOURCES:.cpp=.o)
  19. all: $(SOURCES) $(EXECUTABLE)
  20. $(MAKE) -C packer all
  21. clean:
  22. $(RM) $(OBJECTS) $(EXECUTABLE)
  23. $(MAKE) -C packer clean
  24. $(EXECUTABLE): $(OBJECTS)
  25. $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
  26. .cpp.o:
  27. $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
  28. run: $(EXECUTABLE)
  29. ./$(EXECUTABLE)