2024-08-04 19:40:09 +03:00
|
|
|
# Define compiler and flags
|
|
|
|
CXX = g++
|
2024-08-08 12:44:27 +03:00
|
|
|
CXXFLAGS = `pkg-config --cflags gtkmm-4.0`
|
|
|
|
LDFLAGS = `pkg-config --libs gtkmm-4.0`
|
2024-08-04 19:40:09 +03:00
|
|
|
|
|
|
|
# Define target executable and source files
|
|
|
|
TARGET = bin/Yoda
|
2024-08-08 13:46:02 +03:00
|
|
|
SRCS = src/main.cpp $(wildcard src/app/*.cpp)
|
2024-08-04 19:40:09 +03:00
|
|
|
|
|
|
|
OBJS = $(SRCS:.cpp=.o)
|
|
|
|
|
|
|
|
# Default target
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
# Rule to build the executable
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CXX) -o $@ $(OBJS) $(LDFLAGS)
|
|
|
|
|
|
|
|
# Rule to build object files from source files
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
# Rule to clean up build files
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET) $(OBJS)
|