From abef6da56913f1c55528103e60a50451a39628b1 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Sun, 16 Jun 2024 10:35:45 +0300 Subject: initial commit --- third_party/gldc/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 third_party/gldc/Makefile (limited to 'third_party/gldc/Makefile') diff --git a/third_party/gldc/Makefile b/third_party/gldc/Makefile new file mode 100644 index 0000000..09f3181 --- /dev/null +++ b/third_party/gldc/Makefile @@ -0,0 +1,26 @@ +SOURCE_DIRS := src src/yalloc + +C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) +OBJS := $(notdir $(C_FILES:%.c=%.o)) + +C_FLAGS = -O3 -DNDEBUG -mfsrra -mfsca -fno-math-errno -ffp-contract=fast -ffast-math -O3 -mpretend-cmove -fexpensive-optimizations -fomit-frame-pointer -finline-functions -ml -m4-single-only -ffunction-sections -fdata-sections -std=gnu99 + +C_DEFINES = -DDREAMCAST -DNDEBUG -D__DREAMCAST__ -D__arch_dreamcast -D_arch_dreamcast -D_arch_sub_pristine + +TARGET := libGLdc.a + +ifeq ($(strip $(KOS_BASE)),) +$(error "Please set KOS variables in your environment.") +endif + +default: $(TARGET) + +%.o: src/%.c + kos-cc $(C_DEFINES) $(C_FLAGS) -c $< -o $@ + +%.o: src/yalloc/%.c + kos-cc $(C_DEFINES) $(C_FLAGS) -c $< -o $@ + +$(TARGET): $(OBJS) + kos-ar cr $@ $^ + kos-ranlib $@ \ No newline at end of file -- cgit 1.4.1-2-gfad0