export COLOR
-# Versioning
-MAJOR=2
-MINOR=44
-VERSION = $(MAJOR).$(MINOR)
-
-
# If we're working from git, we have access to proper variables. If
# not, make it clear that we're working from a release.
GIT_DIR ?= .git
$(COMMON_STRINGS):
@echo "** Generating $@"
@echo "#include \"frotz.h\"" > $@
- @echo "const char frotz_version[] = \"$(VERSION)\";" >> $@
- @echo "const char frotz_v_major[] = \"$(MAJOR)\";" >> $@
- @echo "const char frotz_v_minor[] = \"$(MINOR)\";" >> $@
- @echo "const char frotz_v_build[] = \"$(BUILD_DATE_TIME)\";" >> $@
+ @echo "const char build_timestamp[] = \"$(BUILD_DATE_TIME)\";" >> $@
common_defines: $(COMMON_DEFINES)
$(COMMON_DEFINES):
#define STACK_SIZE 1024
#endif
-extern const char
- frotz_version[], frotz_v_major[], frotz_v_minor[], frotz_v_build[];
+extern const char build_timestamp[];
/* Assorted filename extensions */
} while (c != EOF);
if (zoptind != argc - 1) {
- printf("FROTZ V%s\t", frotz_version);
+ printf("FROTZ V%s\t", GIT_TAG);
#ifndef NO_SOUND
printf("Audio output enabled.");
static void print_version(void)
{
- printf("FROTZ V%s\t ", frotz_version);
+ printf("FROTZ V%s\t ", GIT_TAG);
#ifndef NO_SOUND
printf("Audio output enabled.");
#else
printf("Audio output disabled.");
#endif
- printf("\nBuild:\t\t %s\n", frotz_v_build);
+ printf("\nBuild:\t\t %s\n", build_timestamp);
printf("Git commit:\t %s\n", GIT_HASH);
printf("Git commit short: %s\n", GIT_HASH_SHORT);
printf("Git tag:\t %s\n", GIT_TAG);
} while (c != EOF);
if (((argc - zoptind) != 1) && ((argc - zoptind) != 2)) {
- printf("FROTZ V%s\tDumb interface.\n", frotz_version);
+ printf("FROTZ V%s\tDumb interface.\n", GIT_TAG);
puts(INFORMATION);
printf("\t-Z # error checking mode (default = %d)\n"
"\t %d = don't report errors %d = report first error\n"
static void print_version(void)
{
- printf("FROTZ V%s\t", frotz_version);
+ printf("FROTZ V%s\t", GIT_TAG);
printf("Dumb interface.\n");
printf("Git commit:\t%s\n", GIT_HASH);
printf("Git tag:\t%s\n", GIT_TAG);
static void usage()
{
char **p = infos; int i=0,len=0;
- printf(info1, frotz_version, frotz_v_build);
+ printf(info1, GIT_TAG, build_timestamp);
while (*p)
{
if (i)
Uint32 initflags = SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_AUDIO;
sprintf(banner, "SDL Frotz v%s - %s (z%d)",
- frotz_version, f_setup.story_name, h_version);
+ GIT_TAG, f_setup.story_name, h_version);
if ( SDL_Init(initflags) < 0 ) {
os_fatal("Couldn't initialize SDL: %s", SDL_GetError());