Açıklama Yok
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 982B

123456789101112131415161718192021222324252627282930313233343536373839
  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. 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)