From be638b5d96152dfc66a5b80dc64eaa2f9e0acdb6 Mon Sep 17 00:00:00 2001 From: Hayden Kowalchuk Date: Wed, 29 Jan 2020 22:40:43 -0500 Subject: [PATCH] fix: makefile didnt build --- Makefile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b24acae..f714769 100644 --- a/Makefile +++ b/Makefile @@ -6,17 +6,22 @@ # Copyright (C) 2018 Luke Benstead TARGET = libGLdc.a -#OBJS = GL/gldc.o -OBJS = GL/draw.o GL/flush.o GL/framebuffer.o GL/immediate.o GL/lighting.o GL/state.o GL/texture.o GL/glu.o -OBJS += GL/matrix.o GL/fog.o GL/error.o GL/clip.o containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o +OBJS = GL/gldc.o +#OBJS = GL/draw.o GL/flush.o GL/framebuffer.o GL/immediate.o GL/lighting.o GL/state.o GL/texture.o GL/glu.o +#OBJS += GL/matrix.o GL/fog.o GL/error.o GL/clip.o containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o OBJS += containers/stack.o containers/named_array.o containers/aligned_vector.o GL/profiler.o SUBDIRS = -EXTRA_CFLAGS= -Wall -Wextra +GCCVERSIONGTEQ5 := $(shell expr `sh-elf-gcc -dumpversion | cut -f1 -d.` \>= 5) + +ifeq "$(GCCVERSIONGTEQ5)" "1" + GCC_WILD_FLAGS = -mdiv=inv -matomic-model=none -maccumulate-outgoing-args -ffp-contract=fast -mpretend-cmove -ffinite-math-only + GCC5_FLAGS = -mfsca -mfsrra -mlra $(GCC_WILD_FLAGS) +endif + +EXTRA_CFLAGS= -Wall -Wextra $(GCC5_FLAGS) KOS_CFLAGS += -ffast-math -O2 -funroll-loops -fsingle-precision-constant -Iinclude -funsafe-math-optimizations -DBUILD_LIBGL $(EXTRA_CFLAGS) -#KOS_CFLAGS += -O1 -mlra -Iinclude -DBUILD_LIBGL -Wall -Wextra -#GCC5_FLAGS = -mfsca -mfsrra -mlra # Manipulate the CFLAGS to look our *our* version of the library and includes INC_DIR = $(abspath ./include) @@ -24,9 +29,7 @@ LIB_DIR = $(abspath ./) export CFLAGS := $(CFLAGS) -I $(INC_DIR) export OBJEXTRA := $(LIB_DIR)/libGLdc.a -default: build link - -link: +link: | $(OBJS) ; $(KOS_AR) rcs $(TARGET) $(OBJS) build: $(OBJS) link