Sindbad~EG File Manager
# Define compiler and flags
CC = gcc
CFLAGS = -Wall -g -DSVG -DXCODE -I.
LDFLAGS = -lm
# Define source directories
SOURCE_DIRECTORIES = \
bignums \
parser \
Engine \
docdata \
polyval \
cgraph \
prover \
Localizer/natlang \
Localizer/english \
Localizer/chinese \
Localizer/dutch \
Localizer/french \
Localizer/italian \
Localizer/spanish \
Localizer/german \
deval \
series \
ProblemLibrary \
getprob \
userfunc \
symsout \
heap \
trigcalc \
algebra \
automode \
var
# 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/MathXpertEngine $(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/MathXpertEngine
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