Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. VPATH = src
  2. CC = g++
  3. CXXFLAG = --std=c++11 -I headers -Ofast
  4. HEADERS = $(wildcard headers/*.h)
  5. LIBS = -lsfml-graphics -lsfml-window -lsfml-system
  6. OBJ = diamondsquare.o \
  7. markovNames.o \
  8. landMap.o \
  9. lightingGenerator.o \
  10. perlinNoise.o \
  11. normalizer.o \
  12. fractalNoise.o \
  13. windMap.o \
  14. heatMap.o \
  15. islandHeightmapGenerator.o \
  16. waterGenerator.o \
  17. river.o \
  18. groundWaterMap.o \
  19. biomeGenerator.o \
  20. renderedMap.o
  21. FRONTEND_OBJ = main.o \
  22. sfmlFrontend.o \
  23. mapDisplay.o
  24. GUI_OBJ = gui.o \
  25. guiFrontend.o \
  26. button.o \
  27. textBox.o \
  28. progressWindow.o
  29. TEST_OBJ = tester.o
  30. EXEC = pws
  31. all : pws test gui
  32. src/landMap.o: src/landMap.cpp
  33. $(CC) -c src/landMap.cpp -o landMap.o --std=c++11 -I headers -O2
  34. %.o : %.cpp
  35. $(CC) -c $< -o $@ $(CXXFLAG)
  36. pws : $(FRONTEND_OBJ) $(OBJ) $(HEADERS)
  37. $(CC) -o $(EXEC) $(FRONTEND_OBJ) $(OBJ) $(LIBS)
  38. test : $(TEST_OBJ) $(OBJ) $(HEADERS)
  39. $(CC) -o test $(TEST_OBJ) $(OBJ) $(LIBS)
  40. gui : $(GUI_OBJ) $(OBJ) $(HEADERS)
  41. $(CC) -o guipig $(GUI_OBJ) $(OBJ) $(LIBS)
  42. .PHONY : clean
  43. clean :
  44. rm $(EXEC) test guipig $(OBJ) $(FRONTEND_OBJ) $(TEST_OBJ) $(GUI_OBJ)