GLdc/Makefile
Ben Baron 0beaba5aeb Fixed Makefile GL/version.h (echo -e to printf)
The `echo -e` command is non-standard, and ends up printing a -e at the top of the version.h file. Switching it to `printf` works correctly and is the "correct" command to work in all shells.

I also removed the GL/version.h file from the git cache, as it's in .gitignore but seems to have been accidentally checked in.
2020-04-05 13:47:32 -05:00

37 lines
972 B
Makefile

# KallistiOS ##version##
#
# kos-ports/libgl Makefile
# Copyright (C) 2013, 2014 Josh Pearson
# Copyright (C) 2014 Lawrence Sebald
# Copyright (C) 2020 Luke Benstead
TARGET = libGLdc.a
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 GL/version.h
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
SUBDIRS =
KOS_CFLAGS += -ffast-math -Ofast -Iinclude
GL/version.h:
rm -f $@
@printf '#pragma once\n#define GLDC_VERSION "$(shell git describe --abbrev=4 --dirty --always --tags)"\n' > $@
link:
$(KOS_AR) rcs $(TARGET) $(OBJS)
build: GL/version.h $(OBJS) link
samples: build
$(KOS_MAKE) -C samples all
defaultall: create_kos_link $(OBJS) subdirs linklib samples
include $(KOS_BASE)/addons/Makefile.prefab
# creates the kos link to the headers
create_kos_link:
rm -f ../include/GL
ln -s ../GLdc/include ../include/GL