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

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/*.c)
  19. SOURCES_CPP=$(wildcard src/*.cpp)
  20. OBJECTS=$(SOURCES:.c=.o) $(SOURCES_CPP:.cpp=.o)
  21. all: $(SOURCES) $(SOURCES_CPP) $(EXECUTABLE)
  22. clean:
  23. $(RM) $(OBJECTS) $(EXECUTABLE)
  24. $(EXECUTABLE): $(OBJECTS)
  25. $(CPP) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBRARIES)
  26. .c.o:
  27. $(CC) $(INCLUDES) -c $(CFLAGS) $< -o $@
  28. .cpp.o:
  29. $(CPP) $(INCLUDES) -c $(CPPFLAGS) $< -o $@
  30. debug: $(EXECUTABLE)
  31. gdb $(EXECUTABLE)
  32. run: $(EXECUTABLE)
  33. ./$(EXECUTABLE)