Makefile 904 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. islandHeightmapGenerator.o \
  15. waterGenerator.o \
  16. river.o
  17. FRONTEND_OBJ = main.o \
  18. sfmlFrontend.o \
  19. mapDisplay.o
  20. TEST_OBJ = tester.o
  21. EXEC = pws
  22. all : pws
  23. src/landMap.o: src/landMap.cpp
  24. $(CC) -c src/landMap.cpp -o landMap.o --std=c++11 -I headers -O2
  25. %.o : %.cpp
  26. $(CC) -c $< -o $@ $(CXXFLAG)
  27. pws : $(FRONTEND_OBJ) $(OBJ) $(HEADERS)
  28. $(CC) -o $(EXEC) $(FRONTEND_OBJ) $(OBJ) $(LIBS)
  29. test : $(TEST_OBJ) $(OBJ) $(HEADERS)
  30. $(CC) -o test $(TEST_OBJ) $(OBJ) $(LIBS)
  31. .PHONY : clean
  32. clean :
  33. rm $(EXEC) $(OBJ) $(FRONTEND_OBJ) $(TEST_OBJ)