initial
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
# Detect Operating System
|
||||
OS := $(shell uname)
|
||||
|
||||
# Compiler
|
||||
CXX = g++
|
||||
CXXFLAGS = -std=c++11 -Wall
|
||||
|
||||
# Paths for Homebrew on macOS (Silicon/M1/M2/M3)
|
||||
ifeq ($(OS), Darwin)
|
||||
SFML_DIR = $(shell brew --prefix sfml)
|
||||
INCLUDES = -I$(SFML_DIR)/include
|
||||
LIBS = -L$(SFML_DIR)/lib -lsfml-graphics -lsfml-window -lsfml-system
|
||||
else
|
||||
# Standard Linux paths
|
||||
INCLUDES =
|
||||
LIBS = -lsfml-graphics -lsfml-window -lsfml-system
|
||||
endif
|
||||
|
||||
# Target
|
||||
TARGET = app
|
||||
SRC = main.cpp
|
||||
|
||||
$(TARGET): $(SRC)
|
||||
$(CXX) $(CXXFLAGS) $(SRC) -o $(TARGET) $(INCLUDES) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
Reference in New Issue
Block a user