暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

Makefile 909B

12345678910111213141516171819202122232425262728293031323334353637
  1. # To compile this you will need MinGW with MSYS installed in PATH
  2. CFLAGS=-Wall -Wno-misleading-indentation -Werror -g
  3. CPPFLAGS=-Wall -Wno-misleading-indentation -Werror --std=c++1z -g
  4. LDFLAGS=
  5. INCLUDES=-I./include
  6. ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
  7. LIBRARIES=-luser32 -lgdi32 -lopengl32 -lgdiplus -lwinmm
  8. EXECUTABLE=awoorwae.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. EXECUTABLE=awoorwae
  15. CC=gcc
  16. CPP=g++
  17. endif
  18. SOURCES=$(wildcard src/*.cpp) $(wildcard src/**/*.cpp)
  19. OBJECTS=$(SOURCES:.cpp=.o)
  20. all: $(SOURCES) $(EXECUTABLE)
  21. clean:
  22. $(RM) $(OBJECTS) $(EXECUTABLE)
  23. $(EXECUTABLE): $(OBJECTS)
  24. $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
  25. .cpp.o:
  26. $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
  27. debug: $(EXECUTABLE)
  28. gdb $(EXECUTABLE)
  29. run: $(EXECUTABLE)
  30. ./$(EXECUTABLE)