Build fixing for FreeBSD. GNU make is installed as gmake, so make a MAKE
variable (defaults to "make") and use that. Use the MKDEP and MKDEP_OPTIONS more. Our shell isn't bash, so change the instances of ">& /dev/null" to a more compatible "> /dev/null 2>&1".
This commit is contained in:
8
Makefile
8
Makefile
@@ -7,19 +7,19 @@ SUBDIRS = src progs
|
|||||||
|
|
||||||
default: $(TOP)/configs/current
|
default: $(TOP)/configs/current
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir ; make) || exit 1 ; \
|
(cd $$dir ; $(MAKE)) || exit 1 ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
realclean:
|
realclean:
|
||||||
touch $(TOP)/configs/current
|
touch $(TOP)/configs/current
|
||||||
make clean
|
$(MAKE) clean
|
||||||
-rm -rf lib*
|
-rm -rf lib*
|
||||||
-rm -f $(TOP)/configs/current
|
-rm -f $(TOP)/configs/current
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ sunos5-gcc \
|
|||||||
sunos5-smp \
|
sunos5-smp \
|
||||||
ultrix-gcc:
|
ultrix-gcc:
|
||||||
(cd configs && rm -f current && ln -s $@ current)
|
(cd configs && rm -f current && ln -s $@ current)
|
||||||
make default
|
$(MAKE) default
|
||||||
|
|
||||||
|
|
||||||
# Rules for making release tarballs
|
# Rules for making release tarballs
|
||||||
|
@@ -24,7 +24,7 @@ GLU_CFLAGS =
|
|||||||
MKLIB_OPTIONS =
|
MKLIB_OPTIONS =
|
||||||
MKDEP = makedepend
|
MKDEP = makedepend
|
||||||
MKDEP_OPTIONS = -Y -fdepend
|
MKDEP_OPTIONS = -Y -fdepend
|
||||||
|
MAKE = make
|
||||||
|
|
||||||
# Library names (base name)
|
# Library names (base name)
|
||||||
GL_LIB = GL
|
GL_LIB = GL
|
||||||
|
@@ -7,6 +7,7 @@ CONFIG_NAME = FreeBSD
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
MAKE = gmake
|
||||||
|
|
||||||
CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
|
CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
|
||||||
CXXFLAGS = -O2 -fPIC -pedantic
|
CXXFLAGS = -O2 -fPIC -pedantic
|
||||||
|
@@ -10,7 +10,7 @@ SUBDIRS = $(PROGRAM_DIRS)
|
|||||||
default: $(TOP)/configs/current
|
default: $(TOP)/configs/current
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
if [ -d $$dir ] ; then \
|
if [ -d $$dir ] ; then \
|
||||||
(cd $$dir ; make) || exit 1 ; \
|
(cd $$dir ; $(MAKE)) || exit 1 ; \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -18,6 +18,6 @@ default: $(TOP)/configs/current
|
|||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) tests ; do \
|
@for dir in $(SUBDIRS) tests ; do \
|
||||||
if [ -d $$dir ] ; then \
|
if [ -d $$dir ] ; then \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
@@ -47,7 +47,7 @@ clean:
|
|||||||
|
|
||||||
depend: $(SOURCES)
|
depend: $(SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
makedepend -fdepend -Y $(INCLUDES) $(SOURCES) >& /dev/null
|
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Emacs tags
|
# Emacs tags
|
||||||
|
@@ -13,7 +13,7 @@ default: $(LIB_DIR) subdirs
|
|||||||
subdirs:
|
subdirs:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
if [ -d $$dir ] ; then \
|
if [ -d $$dir ] ; then \
|
||||||
(cd $$dir ; make) || exit 1 ; \
|
(cd $$dir ; $(MAKE)) || exit 1 ; \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -25,6 +25,6 @@ $(LIB_DIR):
|
|||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
if [ -d $$dir ] ; then \
|
if [ -d $$dir ] ; then \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
@@ -10,11 +10,11 @@ SUBDIRS = $(GLU_DIRS)
|
|||||||
|
|
||||||
default: $(TOP)/configs/current
|
default: $(TOP)/configs/current
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir ; make) ; \
|
(cd $$dir ; $(MAKE)) ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
done
|
done
|
||||||
|
@@ -44,7 +44,8 @@ $(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
|
|||||||
#
|
#
|
||||||
depend: $(GLW_SOURCES)
|
depend: $(GLW_SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
$(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) >&/dev/null
|
$(MKDEP) $(MKDEP_OPTIONS) -I$(TOP)/include $(GLW_SOURCES) \
|
||||||
|
> /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
include depend
|
include depend
|
||||||
|
@@ -4,9 +4,9 @@ include $(TOP)/configs/current
|
|||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
cd mini ; make
|
cd mini ; $(MAKE)
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
cd mini ; make clean
|
cd mini ; $(MAKE) clean
|
||||||
|
|
||||||
|
@@ -21,11 +21,11 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
|
|||||||
# Figure out what to make here
|
# Figure out what to make here
|
||||||
default:
|
default:
|
||||||
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
|
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
|
||||||
make linux-solo ; \
|
$(MAKE) linux-solo ; \
|
||||||
elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
|
elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
|
||||||
make osmesa-only ; \
|
$(MAKE) osmesa-only ; \
|
||||||
else \
|
else \
|
||||||
make stand-alone ; \
|
$(MAKE) stand-alone ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ mesa.a: $(SOLO_OBJECTS)
|
|||||||
# target, otherwise make will look & see that the "drivers" directory
|
# target, otherwise make will look & see that the "drivers" directory
|
||||||
# already exists, so not try to rebuild it...
|
# already exists, so not try to rebuild it...
|
||||||
driver-dirs:
|
driver-dirs:
|
||||||
cd drivers/dri ; make
|
cd drivers/dri ; $(MAKE)
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
@@ -101,7 +101,7 @@ stand-alone: depend subdirs $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(OSMESA_LIB_NA
|
|||||||
osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME)
|
osmesa-only: depend subdirs $(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||||
|
|
||||||
subdirs:
|
subdirs:
|
||||||
@ (cd x86 ; make)
|
@ (cd x86 ; $(MAKE))
|
||||||
|
|
||||||
# Make the GL library
|
# Make the GL library
|
||||||
$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
|
$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
|
||||||
@@ -159,7 +159,8 @@ SUBDIRS = array_cache drivers/dri glapi main math sparc swrast swrast_setup \
|
|||||||
# Update dependencies
|
# Update dependencies
|
||||||
depend: $(ALL_SOURCES)
|
depend: $(ALL_SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) >& /dev/null
|
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(ALL_SOURCES) \
|
||||||
|
> /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Emacs tags
|
# Emacs tags
|
||||||
@@ -170,7 +171,7 @@ clean:
|
|||||||
-rm -f */*.o
|
-rm -f */*.o
|
||||||
rm -f depend mesa.a
|
rm -f depend mesa.a
|
||||||
for dir in $(SUBDIRS) ; do \
|
for dir in $(SUBDIRS) ; do \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
include depend
|
include depend
|
||||||
|
@@ -17,12 +17,12 @@ subdirs:
|
|||||||
echo $(DRI_DIRS)
|
echo $(DRI_DIRS)
|
||||||
@for dir in $(DRI_DIRS) ; do \
|
@for dir in $(DRI_DIRS) ; do \
|
||||||
echo $$dir ; \
|
echo $$dir ; \
|
||||||
(cd $$dir ; make) || exit 1; \
|
(cd $$dir ; $(MAKE)) || exit 1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for dir in $(DRI_DIRS) ; do \
|
@for dir in $(DRI_DIRS) ; do \
|
||||||
(cd $$dir ; make clean) ; \
|
(cd $$dir ; $(MAKE) clean) ; \
|
||||||
done
|
done
|
||||||
rm common/*.o
|
rm common/*.o
|
||||||
|
@@ -43,7 +43,7 @@ default: depend dri.a
|
|||||||
depend: $(C_SOURCES) $(ASM_SOURCES)
|
depend: $(C_SOURCES) $(ASM_SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
$(MKDEP) $(MKDEP_OPTIONS) -Y $(INCLUDES) \
|
$(MKDEP) $(MKDEP_OPTIONS) -Y $(INCLUDES) \
|
||||||
$(C_SOURCES) $(ASM_SOURCES) >& /dev/null
|
$(C_SOURCES) $(ASM_SOURCES) > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
dri.a: $(OBJECTS)
|
dri.a: $(OBJECTS)
|
||||||
|
@@ -64,7 +64,7 @@ $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
|
|||||||
depend: $(C_SOURCES) $(ASM_SOURCES)
|
depend: $(C_SOURCES) $(ASM_SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
|
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
|
||||||
>& /dev/null
|
> /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Emacs tags
|
# Emacs tags
|
||||||
|
@@ -74,7 +74,7 @@ $(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
|
|||||||
depend: $(C_SOURCES) $(ASM_SOURCES)
|
depend: $(C_SOURCES) $(ASM_SOURCES)
|
||||||
touch depend
|
touch depend
|
||||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
|
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
|
||||||
>& /dev/null
|
> /dev/null 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Emacs tags
|
# Emacs tags
|
||||||
|
Reference in New Issue
Block a user