Sindbad~EG File Manager
# Define compiler and flags
CC = gcc
CFLAGS = -Wall -Wno-free-nonheap-object -g -DSVG -DXCODE -I.
LDFLAGS = -lm
# Define source directories
SOURCE_DIRECTORIES = \
ThreeBodyProblem
# Collect all source files from the specified directories
SRCS = $(foreach dir,$(SOURCE_DIRECTORIES),$(wildcard $(dir)/*.c))
# Define object files corresponding to the source files
OBJS = $(patsubst %.c,bin/%.o,$(SRCS))
# Default rule to build the target
all: $(OBJS)
@mkdir -p bin
$(CC) $(CFLAGS) -o bin/ThreeBodyEngine $(OBJS) $(LDFLAGS)
# Rule to compile source files into object files
bin/%.o: %.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) -c $< -o $@
# Rule to clean the build
clean:
find bin -type f -name '*.o' -delete
rm -f bin/ThreeBodyEngine
find bin -type d -empty -delete
# Print source and object files for debugging
print:
@echo "Source directories: $(SOURCE_DIRECTORIES)"
@$(foreach dir,$(SOURCE_DIRECTORIES),echo "$(dir): $(wildcard $(dir)/*.c)";)
@echo "Source files: $(SRCS)"
@echo "Object files: $(OBJS)"
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists