mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
init Makefile
This commit is contained in:
parent
47be4e1214
commit
1c1b1ea41f
1 changed files with 25 additions and 0 deletions
25
Makefile
Normal file
25
Makefile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Define compiler and flags
|
||||
CXX = g++
|
||||
CXXFLAGS = `pkg-config --cflags gtk4`
|
||||
LDFLAGS = `pkg-config --libs gtk4`
|
||||
|
||||
# Define target executable and source files
|
||||
TARGET = bin/Yoda
|
||||
SRCS = src/main.cpp $(wildcard src/**/*.cpp)
|
||||
|
||||
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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue