2023-02-25 19:04:34 +00:00
|
|
|
CPP = /opt/cross/bin/i686-elf-g++
|
2023-02-19 22:38:32 +00:00
|
|
|
CFLAGS = -ffreestanding -Og -ggdb -Wall -Wextra
|
|
|
|
|
2023-02-19 23:29:06 +00:00
|
|
|
BUILD_DIR = ../build/CoreLib
|
|
|
|
OBJ_FOLDER = ../bin/CoreLib
|
2023-02-19 22:38:32 +00:00
|
|
|
OUTPUTFILE = $(BUILD_DIR)/libCoreLib.a
|
|
|
|
|
2023-02-25 19:41:21 +00:00
|
|
|
OFILES = $(OBJ_FOLDER)/ctype.o $(OBJ_FOLDER)/memory.o $(OBJ_FOLDER)/path.o $(OBJ_FOLDER)/stack.o $(OBJ_FOLDER)/string.o $(OBJ_FOLDER)/stringview.o
|
2023-02-19 22:38:32 +00:00
|
|
|
|
|
|
|
.phony: all
|
|
|
|
all: $(OUTPUTFILE)
|
2023-02-19 23:29:06 +00:00
|
|
|
cp *.h $(BUILD_DIR)/include/CoreLib
|
2023-02-19 22:38:32 +00:00
|
|
|
|
|
|
|
$(OUTPUTFILE): $(OFILES)
|
2023-02-25 19:04:34 +00:00
|
|
|
pwd
|
2023-02-19 22:38:32 +00:00
|
|
|
ar -rc $(OUTPUTFILE) $(OFILES)
|
|
|
|
|
2023-02-25 19:41:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
$(OBJ_FOLDER)/ctype.o: ctype.cpp
|
|
|
|
$(CPP) -c ctype.cpp -o $(OBJ_FOLDER)/ctype.o $(CFLAGS)
|
|
|
|
|
2023-02-19 22:38:32 +00:00
|
|
|
$(OBJ_FOLDER)/memory.o: Memory.cpp
|
|
|
|
$(CPP) -c Memory.cpp -o $(OBJ_FOLDER)/memory.o $(CFLAGS)
|
|
|
|
|
|
|
|
$(OBJ_FOLDER)/path.o: Path.cpp
|
|
|
|
$(CPP) -c Path.cpp -o $(OBJ_FOLDER)/path.o $(CFLAGS)
|
|
|
|
|
|
|
|
$(OBJ_FOLDER)/stack.o: Stack.cpp
|
|
|
|
$(CPP) -c Stack.cpp -o $(OBJ_FOLDER)/stack.o $(CFLAGS)
|
|
|
|
|
|
|
|
$(OBJ_FOLDER)/string.o: String.cpp
|
|
|
|
$(CPP) -c String.cpp -o $(OBJ_FOLDER)/string.o $(CFLAGS)
|
|
|
|
|
|
|
|
$(OBJ_FOLDER)/stringview.o: StringView.cpp
|
|
|
|
$(CPP) -c StringView.cpp -o $(OBJ_FOLDER)/stringview.o $(CFLAGS)
|
|
|
|
|