Generate version.h and print version on boot. Fixes #46
This commit is contained in:
parent
8f84cbb142
commit
888a48562f
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -6,3 +6,4 @@
|
|||
*.img
|
||||
dc-build.sh
|
||||
.buildconfig
|
||||
GL/version.h
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "../containers/aligned_vector.h"
|
||||
#include "private.h"
|
||||
#include "profiler.h"
|
||||
#include "version.h"
|
||||
|
||||
#define TA_SQ_ADDR (unsigned int *)(void *) \
|
||||
(0xe0000000 | (((unsigned long)0x10000000) & 0x03ffffe0))
|
||||
|
@ -87,6 +88,8 @@ void APIENTRY glKosInitConfig(GLdcConfig* config) {
|
|||
void APIENTRY glKosInitEx(GLdcConfig* config) {
|
||||
TRACE();
|
||||
|
||||
printf("\nWelcome to GLdc! Git revision: %s\n\n", GLDC_VERSION);
|
||||
|
||||
_glInitPVR(config->autosort_enabled);
|
||||
|
||||
_glInitMatrices();
|
||||
|
|
7
Makefile
7
Makefile
|
@ -6,17 +6,20 @@
|
|||
# Copyright (C) 2018 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
|
||||
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:
|
||||
@echo -e '#pragma once\n#define GLDC_VERSION "$(shell git describe --abbrev=4 --dirty --always --tags)"\n' > $@
|
||||
|
||||
link:
|
||||
$(KOS_AR) rcs $(TARGET) $(OBJS)
|
||||
|
||||
build: $(OBJS) link
|
||||
build: GL/version.h $(OBJS) link
|
||||
|
||||
|
||||
samples: build
|
||||
|
|
Loading…
Reference in New Issue
Block a user