暫無描述
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 663B

12345678910111213141516171819202122232425262728293031
  1. CC=gcc
  2. CPP=g++
  3. CFLAGS=-Wall -Wno-misleading-indentation -Werror -g
  4. CPPFLAGS=-Wall -Wno-misleading-indentation -Werror --std=c++1z -g
  5. LDFLAGS=
  6. INCLUDES=
  7. LIBRARIES=-lX11 -lGL -lpthread -lpng
  8. SOURCES=$(wildcard src/*.c)
  9. SOURCES_CPP=$(wildcard src/*.cpp)
  10. OBJECTS=$(SOURCES:.c=.o) $(SOURCES_CPP:.cpp=.o)
  11. EXECUTABLE=awoorwa
  12. all: $(SOURCES) $(SOURCES_CPP) $(EXECUTABLE)
  13. clean:
  14. rm -rf $(OBJECTS) $(EXECUTABLE)
  15. $(EXECUTABLE): $(OBJECTS)
  16. $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
  17. .c.o:
  18. $(CC) $(INCLUDES) -c $(CFLAGS) $< -o $@
  19. .cpp.o:
  20. $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
  21. debug: $(EXECUTABLE)
  22. gdb $(EXECUTABLE)
  23. run: $(EXECUTABLE)
  24. ./$(EXECUTABLE)