2021-03-20 16:50:45 +01:00
|
|
|
CC := g++
|
2022-08-01 05:27:38 +02:00
|
|
|
CFLAGS := -Wall -std=c++11
|
2021-03-18 22:18:54 +01:00
|
|
|
LFLAGS :=
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2021-03-25 00:17:33 +01:00
|
|
|
YABCODESTRUCTURES_SOURCE_DEPS := yabCodeStructures.cpp yab2cpp.h yab2cpp.cpp tester.cpp runtime/runtime.h
|
2021-03-24 18:47:00 +01:00
|
|
|
YAB2CPP_SOURCE_DEPS := yab2cpp.cpp yab2cpp.h tester.cpp
|
|
|
|
YABDATASTRUCTURES_SOURCE_DEPS := yabDataStructures.cpp yab2cpp.h yab2cpp.cpp tester.cpp
|
|
|
|
YABFUNCTIONS_SOURCE_DEPS := yabFunctions.cpp yab2cpp.h yab2cpp.cpp tester.cpp
|
|
|
|
YABIO_SOURCE_DEPS := yab2cpp.h yab2cpp.cpp tester.cpp
|
2022-08-01 05:27:38 +02:00
|
|
|
BIN_OBJECT_DEPS := build/yabCodeStructures.o build/yabFunctions.o build/yabDataStructures.o build/yabIO.o
|
|
|
|
YAB2CPP_OBJECT_DEPS := $(BIN_OBJECT_DEPS) build/yab2cpp.o
|
|
|
|
TESTER_OBJECT_DEPS := $(BIN_OBJECT_DEPS) build/tester.o
|
2021-03-18 00:56:14 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
.PHONY:all
|
|
|
|
all: CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -Os
|
2021-03-18 22:18:54 +01:00
|
|
|
all: binaries
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
.PHONY:debug
|
|
|
|
debug: CXXFLAGS := $(CFLAGS) -g
|
|
|
|
debug: binaries
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
.PHONY:binaries
|
|
|
|
binaries: yab2cpp tester
|
2021-03-24 18:47:00 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
tester: $(TESTER_OBJECT_DEPS)
|
|
|
|
$(CC) -o tester $(TESTER_OBJECT_DEPS) $(LFLAGS)
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
yab2cpp: $(YAB2CPP_OBJECT_DEPS)
|
2021-03-20 16:50:45 +01:00
|
|
|
$(CC) -o yab2cpp $(YAB2CPP_OBJECT_DEPS) $(LFLAGS)
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/yabCodeStructures.o: $(YABCODESTRUCTURES_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) yabCodeStructures.cpp -o build/yabCodeStructures.o
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/tester.o: $(YAB2CPP_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) tester.cpp -o build/tester.o
|
2021-03-24 18:47:00 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/yab2cpp.o: $(YAB2CPP_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) yab2cpp.cpp -o build/yab2cpp.o
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/yabIO.o: $(YABIO_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) yabIO.cpp -o build/yabIO.o
|
2021-03-24 18:47:00 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/yabDataStructures.o: $(YABDATASTRUCTURES_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) yabDataStructures.cpp -o build/yabDataStructures.o
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2022-08-01 05:27:38 +02:00
|
|
|
build/yabFunctions.o: $(YABFUNCTIONS_SOURCE_DEPS)
|
|
|
|
$(CC) -c $(CXXFLAGS) yabFunctions.cpp -o build/yabFunctions.o
|
2021-03-16 23:01:28 +01:00
|
|
|
|
2021-03-18 22:18:54 +01:00
|
|
|
.PHONY: clean
|
2021-03-16 23:01:28 +01:00
|
|
|
clean:
|
2022-08-01 22:35:43 +02:00
|
|
|
rm -rf build/*.o output/*.h output/*.cpp yab2cpp tester
|