diff options
-rw-r--r-- | extern/Makefile | 12 | ||||
-rw-r--r-- | extern/ode/Makefile | 16 | ||||
-rw-r--r-- | extern/ode/patchfile.FreeBSD (renamed from extern/ode/dist/FreeBSD-patch) | 10 |
3 files changed, 26 insertions, 12 deletions
diff --git a/extern/Makefile b/extern/Makefile index 5dbc6f4a0f9..0225f78fabf 100644 --- a/extern/Makefile +++ b/extern/Makefile @@ -30,13 +30,17 @@ # ***** END GPL/BL DUAL LICENSE BLOCK ***** # Bounces make to subdirectories. Also installs after succesful all target. +include nan_definitions.mk + SOURCEDIR = extern +DIR = $(OCGDIR)/extern +DIRS = ode -ALLDIRS = ode +include nan_subdirs.mk -all:: - @for i in $(ALLDIRS); do \ +install: + @for i in $(DIRS); do \ echo "====> $(MAKE) $@ in $(SOURCEDIR)/$$i" ;\ - $(MAKE) -C $$i install || exit 1; \ + $(MAKE) -C $$i $@ || exit 1; \ done diff --git a/extern/ode/Makefile b/extern/ode/Makefile index 9a0f6cbc4a4..5e33148ec3e 100644 --- a/extern/ode/Makefile +++ b/extern/ode/Makefile @@ -35,12 +35,16 @@ DISTDIR = dist CP = ../../intern/tools/cpifdiff.sh all: - ifeq ($(OS),$(findstring $(OS), "linux")) + ifeq ($(OS),freebsd) + (grep FreeBSD $(DISTDIR)/Makefile >/dev/null ; \ + [ $$? -eq 0 ] || patch < patchfile.FreeBSD ) + endif + ifeq ($(OS),$(findstring $(OS), "freebsd linux")) $(MAKE) -C $(DISTDIR) endif -install: - ifeq ($(OS),$(findstring $(OS), "linux")) +install: all + ifeq ($(OS),$(findstring $(OS), "freebsd linux")) @echo "====> $(MAKE) $@ in $(SOURCEDIR)" [ -d $(LCGDIR) ] || mkdir $(LCGDIR) [ -d $(NAN_ODE) ] || mkdir $(NAN_ODE) @@ -58,7 +62,11 @@ install: endif clean: - ifeq ($(OS),$(findstring $(OS), "linux")) + ifeq ($(OS),$(findstring $(OS), "freebsd linux")) [ ! -f dist/Makefile ] || $(MAKE) -C dist clean endif + ifeq ($(OS),freebsd) + (grep FreeBSD $(DISTDIR)/Makefile >/dev/null ; \ + [ $$? -ne 0 ] || patch -R < patchfile.FreeBSD ) + endif diff --git a/extern/ode/dist/FreeBSD-patch b/extern/ode/patchfile.FreeBSD index c1a94ae62c3..1725a3acc45 100644 --- a/extern/ode/dist/FreeBSD-patch +++ b/extern/ode/patchfile.FreeBSD @@ -1,9 +1,11 @@ -diff -u -w -r1.2 Makefile ---- Makefile 4 Nov 2002 21:55:48 -0000 1.2 -+++ Makefile 4 Jan 2003 20:18:18 -0000 -@@ -243,13 +243,13 @@ +--- dist/Makefile.org Sat Jan 11 23:55:46 2003 ++++ dist/Makefile Sat Jan 11 23:55:36 2003 +@@ -242,14 +242,16 @@ + clean: -$(DEL_CMD) $(ODE_OBJECTS) $(ODE_TEST_EXE) $(ODE_LIB) $(DRAWSTUFF_OBJECTS) $(DRAWSTUFF_TEST_EXE) $(DRAWSTUFF_LIB) ode/test/*$(OBJ) drawstuff/dstest/*$(OBJ) $(CONFIGURATOR_EXE) $(CONFIG_H) ++# Patched for FreeBSD ++ %$(OBJ): %.c - $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< + $(CC) $(C_FLAGS) $(C_INC)$(INCPATH) -I/usr/X11R6/include $(DEFINES) $(C_OPT)1 $(C_OUT)$@ $< |