From: Matthew Mondor Date: Sun, 29 Jun 2014 23:58:38 +0000 (+0000) Subject: Some OSX related fixes X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=8a5e67b440c0b5fb03b6b3fb0d76a5f90320132a;p=mmondor.git Some OSX related fixes --- diff --git a/mmsoftware/mystic_ships/client/GNUmakefile b/mmsoftware/mystic_ships/client/GNUmakefile index 813b27a..25be517 100644 --- a/mmsoftware/mystic_ships/client/GNUmakefile +++ b/mmsoftware/mystic_ships/client/GNUmakefile @@ -1,10 +1,10 @@ -# $Id: GNUmakefile,v 1.5 2014/06/25 15:25:36 mmondor Exp $ +# $Id: GNUmakefile,v 1.6 2014/06/29 23:58:38 mmondor Exp $ CC := cc RM := rm UNAME := uname DATE := date -STRIP := strip +STRIP := strip -s -w -R .comment -R .ident -R .debug* TMPDIR := /tmp @@ -49,21 +49,37 @@ Z_LDFLAGS := -lz LDFLAGS += -lm # OS dependent settings follow +OS_TARGET := UNIX OS := $(shell $(UNAME) -s) + ifneq (,$(findstring CYGWIN,$(OS))) # cygwin-mingw + OS_TARGET := MINGW CFLAGS += -mno-cygwin -I/usr/include/mingw -DWIN32 LDFLAGS += -mwindows -mno-cygwin -L/usr/lib/mingw -L/usr/local/lib # GL_CFLAGS := # GL_LDFLAGS := -lopengl32 -lglu32 -else - # unix +endif + +ifneq (,$(findstring Darwin,$(OS))) + # Mac OSX + OS_TARGET := OSX + CFLAGS += -I/usr/include -I/usr/local/include + LDFLAGS += -L/usr/lib -L/usr/local/lib + STRIP := strip +# GL_CFLAGS := +# GL_LDFLAGS := -lGL -lGLU +endif + +ifneq (,$(findstring UNIX,$(OS_TARGET))) + # Other unix (BSD, Linux) CFLAGS += -I/usr/include -I/usr/pkg/include -I/usr/X11R7/include LDFLAGS += -L/usr/lib -L/usr/pkg/lib -L/usr/X11R7/lib # GL_CFLAGS := # GL_LDFLAGS := -lGL -lGLU endif + SEED := $(shell $(DATE) +%s) # Architecture independent settings follow @@ -93,7 +109,7 @@ $(RAWFILES_O): encode filetoc $(BIN): $(OBJS) $(RAWFILES_O) $(CC) -o $@ $(OBJS) $(RAWFILES_O) $(LDFLAGS) - $(STRIP) -s -w -R .comment -R .ident -R .debug* $@* + $(STRIP) $@* clean: $(RM) -f $(BIN) $(BIN).exe $(OBJS) \