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 962B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # To compile this you will need MinGW64 with MSYS installed in PATH
  2. CC=gcc
  3. CPP=g++
  4. CFLAGS=-m64 -Wall -Wno-misleading-indentation -Werror -g
  5. CPPFLAGS=-m64 -Wall -Wno-misleading-indentation -Werror --std=c++1z -g
  6. LDFLAGS=-m64
  7. INCLUDES=-I./include
  8. ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
  9. LIBRARIES=-luser32 -lgdi32 -lopengl32 -lgdiplus -lwinmm
  10. EXECUTABLE=awoorwae.exe
  11. LDFLAGS+=--machine=windows
  12. else
  13. LIBRARIES=-lX11 -lGL -lpthread -lpng -lasound
  14. EXECUTABLE=awoorwae
  15. endif
  16. SOURCES=$(wildcard src/*.c)
  17. SOURCES_CPP=$(wildcard src/*.cpp)
  18. OBJECTS=$(SOURCES:.c=.o) $(SOURCES_CPP:.cpp=.o)
  19. all: $(SOURCES) $(SOURCES_CPP) $(EXECUTABLE)
  20. clean:
  21. $(RM) $(OBJECTS) $(EXECUTABLE)
  22. $(EXECUTABLE): $(OBJECTS)
  23. $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
  24. .c.o:
  25. $(CC) $(INCLUDES) -c $(CFLAGS) $< -o $@
  26. .cpp.o:
  27. $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
  28. debug: $(EXECUTABLE)
  29. gdb $(EXECUTABLE)
  30. run: $(EXECUTABLE)
  31. ./$(EXECUTABLE)