From ebab4f6f9e897038c8f97e10b72847880e1db576 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 14 Dec 2005 00:32:05 +0000 Subject: more MinGW fixes svn path=/trunk/; revision=4204 --- externals/Makefile | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'externals/Makefile') diff --git a/externals/Makefile b/externals/Makefile index 18565305..fbc10f46 100644 --- a/externals/Makefile +++ b/externals/Makefile @@ -37,32 +37,35 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ # #==============================================================================# -OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer -CFLAGS = -DPD -DUNIX -Dunix $(OPT_CFLAGS) -I$(pd_src)/src\ - -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -Wno-shadow \ - -I$(pd_src)/src +OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -fstrict-aliasing + +CFLAGS = -DPD $(OPT_CFLAGS) -I$(pd_src)/src \ + -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -Wno-shadow LDFLAGS = -LIBS = +LIBS = -lm ifeq ($(OS_NAME),darwin) - CFLAGS += -I/sw/include + CFLAGS += -I/sw/include -DMACOSX -DUNIX -Dunix LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib + LIBS += -lc STRIP = echo else ifeq ($(OS_NAME),win) - CFLAGS += -mms-bitfields -D'O_NONBLOCK=1' \ - -D'drand48()=((double)rand()/RAND_MAX)' -D'srand48(n)=srand((n))' - LDFLAGS += -shared - LIBS += -L$(PD_PATH)/bin -lpd + WINDOWS_HACKS = -D'O_NONBLOCK=1' -D'srand48(n)=srand((n))' \ + -D'setenv(a,b,c)=_putenv(a)' \ + -D'drand48()=((double)rand()/RAND_MAX)' -D'bzero(p,n)=memset(p,0,n)' # These don't seem to be needed: -# -D'bzero(p,n)=memset(p,0,n)' \ # -D'PROT_READ=1' \ # -D'MAP_PRIVATE=2' \ # -D'O_NDELAY=O_NONBLOCK' + CFLAGS += -mms-bitfields -DMSW -DNT -DWIN32 $(WINDOWS_HACKS) + LDFLAGS += -shared + LIBS += -L$(pd_src)/bin -lpd -lwsock32 -lpthreadGC2 STRIP = strip --strip-unneeded -R .note -R .comment else - CFLAGS += -fPIC + CFLAGS += -DUNIX -Dunix -fPIC LDFLAGS += -Wl,-export_dynamic -shared + LIBS += -lc STRIP = strip --strip-unneeded -R .note -R .comment endif endif @@ -71,7 +74,7 @@ endif $(CC) $(CFLAGS) -o "$*.o" -c "$*.c" %.$(EXTENSION): %.o - $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" -lc -lm $(LIBS) \ + $(CC) $(LDFLAGS) -o "$*.$(EXTENSION)" "$*.o" $(LIBS) \ `test -f $*.libs && cat $*.libs` \ `test -f $(dir $*)../$(OS_NAME)/$(notdir $*).libs && \ cat $(dir $*)../$(OS_NAME)/$(notdir $*).libs` -- cgit v1.2.1