No Description

DJMakefile 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. UNAME := $(shell uname)
  2. CXX = gpp
  3. CC = gcc
  4. GIT_VERSION := $(shell cat version.git)
  5. PLATFORM := $(MACHTYPE)
  6. CXXFLAGS = -O3 -march=i486 -flto=8 -DVERSION=\"$(GIT_VERSION)\" -DPLATFORM=\"$(PLATFORM)\" -fpermissive -fstack-protector-strong
  7. CFLAGS = -O3 -flto=8 -march=i486 -std=c11 -DVERSION=\"$(GIT_VERSION)\" -fstack-protector-strong
  8. CWARN = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wredundant-decls -Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused
  9. WARNINGS = -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Wzero-as-null-pointer-constant -Wuseless-cast
  10. LIBS = -lglfw -lGL -lGLEW -lharfbuzz -lpolarssl -lwatt -lnx11 -lnano-x -lfreetype2 -lpthread -Ld:/djgpp/lib
  11. LDFLAGS = -O3 -flto=8 -march=i486 -fstack-protector-strong
  12. INCPATH = -Ideps/include
  13. MD5SUM = md5sum
  14. EXECUTABLE = netrunner
  15. LINK = gpp
  16. SRCDIR = src
  17. OBJDIR = gen
  18. DEPDIR = d
  19. SOURCES = $(subst ./,,$(shell find src -name *.cpp))
  20. OBJECTS = $(subst $(SRCDIR),$(OBJDIR),$(SOURCES:.cpp=.o))
  21. all: $(SOURCES) netrunner
  22. netrunner: $(OBJECTS) $(OBJDIR)/tlsf.o
  23. $(LINK) $(LDFLAGS) -o $@ $^ stub.o $(LIBS)
  24. $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
  25. @mkdir -p $(@D)
  26. @mkdir -p $(subst gen,d,$(@D))
  27. $(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARNINGS) -c -o $@ $<
  28. @mv $(DEPDIR)/$*.Td $(DEPDIR)/$*.d
  29. touch $@
  30. $(OBJDIR)/tlsf.o: $(SRCDIR)/tlsf.c
  31. $(CC) $(INCPATH) $(CWARN) -DTLSF_USE_LOCKS=0 -DUSE_SBRK=1 -c -o $@ $<
  32. $(DEPDIR)/%d: ;
  33. .PRECIOUS: $(DEPDIR)/%.d
  34. test-url.o: tests/testPrograms/URLtest.cpp
  35. $(CXX) -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td $(CXXFLAGS) $(INCPATH) $(WARINGS) -c -o $@ $<
  36. ntr-run-tests: test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o
  37. $(LINK) $(LDFLAGS) -o $@ test-url.o $(OBJDIR)/URL.o $(OBJDIR)/StringUtils.o $(LIBS)
  38. clean:
  39. -@rm -rf src/graphics/opengl/shaders/gen $(OBJDIR) $(EXECUTABLE) 2> NUL | true
  40. include $(addsuffix .d,$(subst $(SRCDIR),$(DEPDIR),$(basename $(SOURCES))))