chore: makefile expansion
This commit is contained in:
parent
3a4f09bef2
commit
a57049bf9d
33
Makefile
33
Makefile
|
@ -6,33 +6,38 @@
|
|||
# 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 += 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
|
||||
GCC5_FLAGS =
|
||||
GCCVERSIONGTEQ4 := $(shell expr `sh-elf-gcc -dumpversion | cut -f1 -d.` \>= 5)
|
||||
GCCVERSIONGTEQ5 := $(shell expr `sh-elf-gcc -dumpversion | cut -f1 -d.` \>= 5)
|
||||
|
||||
ifeq "$(GCCVERSIONGTEQ4)" "1"
|
||||
GCC5_FLAGS += -mfsca -mfsrra -mlra
|
||||
ifeq "$(GCCVERSIONGTEQ5)" "1"
|
||||
GCC5_FLAGS =
|
||||
#-mfsca -mfsrra -mlra
|
||||
endif
|
||||
KOS_CFLAGS += -ffast-math -O2 -funroll-loops -fsingle-precision-constant -Iinclude -funsafe-math-optimizations -funit-at-a-time -DBUILD_LIBGL $(EXTRA_CFLAGS) $(GCC5_FLAGS)
|
||||
#KOS_CFLAGS += -O1 -mlra -Iinclude -DBUILD_LIBGL -Wall -Wextra
|
||||
#KOS_CFLAGS = -fomit-frame-pointer -ml -m4-single-only -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine
|
||||
|
||||
#EXTRA_CFLAGS= -Wall -Wextra $(GCC5_FLAGS)
|
||||
#KOS_CFLAGS += -flto -ffast-math -O3 -fsingle-precision-constant -Wdouble-promotion -Iinclude -DBUILD_LIBGL $(EXTRA_CFLAGS)
|
||||
|
||||
KOS_CFLAGS = -fomit-frame-pointer -ml -m4-single-only -I/opt/toolchains/dc/kos/include -I/opt/toolchains/dc/kos/kernel/arch/dreamcast/include -I/opt/toolchains/dc/kos/addons/include -I/opt/toolchains/dc/kos/../kos-ports/include -D_arch_dreamcast -D_arch_sub_pristine
|
||||
# -fstack-usage -Wstack-usage=512
|
||||
BASE_CFLAGS = -Wall -Wextra -Wformat=0 -Wno-missing-field-initializers -Wdouble-promotion -fno-common -fsingle-precision-constant -Xlinker -Map=output.map -DGLQUAKE -DBUILD_LIBGL -std=gnu11
|
||||
KOS_CFLAGS += $(BASE_CFLAGS) -O3 -ffast-math -DQUIET
|
||||
#-flto -funsafe-math-optimizations -mdiv=inv -mfused-madd -maccumulate-outgoing-args -ffp-contract=fast
|
||||
|
||||
KOS_CC = sh-elf-gcc
|
||||
# Manipulate the CFLAGS to look our *our* version of the library and includes
|
||||
INC_DIR = $(abspath ./include)
|
||||
LIB_DIR = $(abspath ./)
|
||||
export CFLAGS := $(CFLAGS) -I $(INC_DIR)
|
||||
export OBJEXTRA := $(LIB_DIR)/libGLdc.a
|
||||
|
||||
default: link
|
||||
|
||||
link: build
|
||||
link: | $(OBJS) ;
|
||||
$(KOS_AR) rcs $(TARGET) $(OBJS)
|
||||
|
||||
build: $(OBJS)
|
||||
|
|
Loading…
Reference in New Issue
Block a user