New 'install' targets in makefile. See bug 2372.
This commit is contained in:
parent
b4517527eb
commit
0e794a1bc6
5
Makefile
5
Makefile
|
@ -33,8 +33,9 @@ realclean:
|
|||
|
||||
|
||||
install:
|
||||
@echo "Installing"
|
||||
$(TOP)/bin/installmesa $(DESTDIR)
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
(cd $$dir ; $(MAKE) install) || exit 1 ; \
|
||||
done
|
||||
|
||||
# DirectFBGL module installation
|
||||
linux-directfb-install:
|
||||
|
|
|
@ -10,7 +10,10 @@ CXX = xlC
|
|||
|
||||
CFLAGS = -O -DAIXV3 -DPTHREADS
|
||||
CXXFLAGS = -O -DAIXV3 -DPTHREADS
|
||||
|
||||
# Misc tools and flags
|
||||
MKLIB_OPTIONS =
|
||||
COPY_LIBS = cp -f -h
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
# This is included by other config files which may override some
|
||||
# of these variables.
|
||||
# Think of this as a base class from which configs are derived.
|
||||
|
||||
|
||||
CONFIG_NAME = default
|
||||
|
||||
|
@ -25,6 +27,8 @@ MKLIB_OPTIONS =
|
|||
MKDEP = makedepend
|
||||
MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
INSTALL = install
|
||||
COPY_LIBS = cp -f -d
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
|
@ -54,9 +58,8 @@ ASM_SOURCES =
|
|||
GLW_SOURCES = GLwDrawA.c
|
||||
|
||||
|
||||
# Directories
|
||||
# Directories to build
|
||||
LIB_DIR = $(TOP)/lib
|
||||
INSTALL_PREFIX = /usr/local
|
||||
SRC_DIRS = mesa glu glut/glx glw
|
||||
GLU_DIRS = sgi
|
||||
DRIVER_DIRS = x11 osmesa
|
||||
|
@ -72,3 +75,9 @@ GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
|||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
|
||||
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/local
|
||||
DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
|
||||
|
|
|
@ -9,6 +9,9 @@ CC = cc
|
|||
CXX = c++
|
||||
MAKE = gmake
|
||||
|
||||
# cp -d not supported on FreeBSD (see bug 4435)
|
||||
COPY_LIBS = cp -f
|
||||
|
||||
OPT_FLAGS = -O2
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ subdirs:
|
|||
fi \
|
||||
done
|
||||
|
||||
# Dummy install target
|
||||
install:
|
||||
|
||||
clean:
|
||||
@for dir in $(SUBDIRS) tests ; do \
|
||||
|
|
|
@ -21,6 +21,12 @@ subdirs:
|
|||
fi \
|
||||
done
|
||||
|
||||
install:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir ; $(MAKE) install) || exit 1 ; \
|
||||
fi \
|
||||
done
|
||||
|
||||
$(LIB_DIR):
|
||||
-mkdir $(LIB_DIR)
|
||||
|
|
|
@ -13,6 +13,9 @@ default: $(TOP)/configs/current
|
|||
(cd $$dir ; $(MAKE)) ; \
|
||||
done
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(INSTALL_DIR)/lib
|
||||
$(COPY_LIBS) $(TOP)/lib/libGLU.* $(INSTALL_DIR)/lib
|
||||
|
||||
clean:
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
|
|
|
@ -96,6 +96,13 @@ $(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
|
|||
$(GLUT_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -d $(INSTALL_DIR)/lib
|
||||
$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(INSTALL_DIR)/include/GL
|
||||
$(COPY_LIBS) $(TOP)/lib/libglut* $(INSTALL_DIR)/lib
|
||||
|
||||
|
||||
clean:
|
||||
-rm -f *.o *~
|
||||
-rm -f *.lo
|
||||
|
|
|
@ -25,6 +25,11 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
|
|||
|
||||
default: $(LIB_DIR)/$(GLW_LIB_NAME)
|
||||
|
||||
install:
|
||||
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -d $(INSTALL_DIR)/lib
|
||||
$(INSTALL) -m 644 *.h $(INSTALL_DIR)/include/GL
|
||||
$(COPY_LIBS) $(TOP)/lib/libGLw.* $(INSTALL_DIR)/lib
|
||||
|
||||
clean:
|
||||
-rm depend depend.bak
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
|
||||
EXTRA_DEFINES = -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_INSTALL_DIR)\"
|
||||
|
||||
SOURCES = \
|
||||
glcontextmodes.c \
|
||||
|
@ -82,6 +83,8 @@ depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_ASM_API) Makefile
|
|||
tags:
|
||||
etags `find . -name \*.[ch]` `find ../include`
|
||||
|
||||
# Dummy install target
|
||||
install:
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
|
|
|
@ -149,11 +149,20 @@ subdirs:
|
|||
|
||||
|
||||
install: default
|
||||
$(INSTALL) -d $(INSTALL_DIR)/include/GL
|
||||
$(INSTALL) -d $(INSTALL_DIR)/lib
|
||||
$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(INSTALL_DIR)/include/GL
|
||||
$(COPY_LIBS) $(TOP)/lib/libGL.* $(INSTALL_DIR)/lib
|
||||
@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
|
||||
cd drivers/dri ; $(MAKE) install ; \
|
||||
fi
|
||||
|
||||
|
||||
## NOT YET:
|
||||
## $(INSTALL) -d $(INSTALL_DIR)/include/GLES
|
||||
## $(INSTALL) -m 644 include/GLES/*.h $(INSTALL_DIR)/include/GLES
|
||||
|
||||
|
||||
# Emacs tags
|
||||
tags:
|
||||
etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h
|
||||
|
|
|
@ -99,6 +99,7 @@ clean:
|
|||
-rm -f depend depend.bak
|
||||
|
||||
install: $(LIBNAME)
|
||||
install $(LIBNAME) /usr/X11R6/lib/modules/dri/$(LIBNAME)
|
||||
$(INSTALL) -d $(DRI_DRIVER_INSTALL_DIR)
|
||||
$(INSTALL) -m 755 $(LIBNAME) $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
include depend
|
||||
|
|
Loading…
Reference in New Issue