diff options
author | DannyArends | 2018-02-28 15:46:43 +0100 |
---|---|---|
committer | DannyArends | 2018-02-28 15:46:43 +0100 |
commit | f44ff52a81650cf5f2a6b1e11f0194e468756672 (patch) | |
tree | 0fe6776cb9997d5234bb311a904e6f70d25dbc23 /Makefile | |
parent | 1b4bdcfabe6d618548114fecba93c8188fb4a7dc (diff) | |
download | pangemma-f44ff52a81650cf5f2a6b1e11f0194e468756672.tar.gz |
OS detection, and version script generator selection via VGEN
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -41,7 +41,19 @@ GEMMA_VERSION = $(shell cat ./VERSION) # Set this variable to either LNX or MAC -SYS = LNX # LNX|MAC (Linux is the default) +ifeq ($(OS),Windows_NT) + SYS = WIN + VGEN = scripts/gen_version_info.cmd +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Darwin) + SYS = MAC + else + SYS = LNX # default to linux + endif + VGEN = scripts/gen_version_info.sh +endif + # Leave blank after "=" to disable; put "= 1" to enable DIST_NAME = gemma-$(GEMMA_VERSION) DEBUG = 1 # DEBUG mode, set DEBUG=0 for a release @@ -149,7 +161,7 @@ OBJS = $(SOURCES:.cpp=.o) all: $(OUTPUT) ./src/version.h: - ./scripts/gen_version_info.sh > src/version.h + $(VGEN) > src/version.h $(OUTPUT): $(OBJS) $(CPP) $(CPPFLAGS) $(OBJS) $(LIBS) -o $(OUTPUT) |