Makefile 694 B

1234567891011121314151617181920212223242526272829
  1. # Install
  2. CC = g++
  3. BIN = demo
  4. # Flags
  5. CFLAGS = -s -O2
  6. SRC = main.cpp
  7. OBJ = $(SRC:.cpp=.o)
  8. # TODO: Mac Build
  9. ifeq ($(OS),Windows_NT)
  10. # Edit the line below to point to your SFML folder on Windows
  11. SFML_DIR = C:/Users/Ricky/MinGW-Libs/SFML
  12. BIN := $(BIN).exe
  13. LIBS = -lmingw32 -DSFML_STATIC -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
  14. else
  15. # Edit the line below to point to your SFML folder on Linux
  16. SFML_DIR = /home/ricky/Libraries/SFML
  17. LIBS = -DSFML_STATIC -lsfml-window-s -lsfml-system-s -pthread -ludev -lGL -lX11 -lXrandr
  18. endif
  19. SFML_INC = -I $(SFML_DIR)/include
  20. SFML_LIB = -L $(SFML_DIR)/lib
  21. $(BIN):
  22. $(CC) $(SRC) $(CFLAGS) -o $(BIN) $(SFML_INC) $(SFML_LIB) $(LIBS)