*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@113 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2003-08-11 18:27:41 +00:00
parent aa62d37b19
commit 0e87cb5025

View File

@ -42,19 +42,22 @@ SHELL = /bin/sh
SYSTEM = $(strip $(shell uname -s))
# ----------------------------------------------------------------------------
ifeq ($(patsubst CYGWIN%,CYGWIN,$(SYSTEM)), CYGWIN)
CC = gcc
EXTRA_CCFLAGS = -mno-cygwin
EXTRA_LDFALGS =
EXTRA_LDFALGS =
EXTRA_CPPFLAGS = -D'GLEW_STATIC'
NAME = glew32
P.BIN = .exe
LIB.DIR = lib
GL_LDFLAGS = -lopengl32
GLU_LDFLAGS = -lglu32
GLUT_LDFLAGS = -lglut $(GLU_LDFLAGS) $(GL_LDFLAGS)
GLUT_LDFLAGS = -lglut32 $(GLU_LDFLAGS) $(GL_LDFLAGS)
else
# ----------------------------------------------------------------------------
ifeq ($(patsubst Linux%,Linux,$(SYSTEM)), Linux)
CC = cc
EXTRA_CCFLAGS =
@ -62,6 +65,7 @@ EXTRA_LDFALGS = -L/usr/X11R6/lib
EXTRA_CPPFLAGS =
NAME = GLEW
P.BIN =
LIB.DIR = lib
# Support broken systems which don't include proper inter-library
# dependency information (several versions of RedHat and SuSE among
@ -74,9 +78,16 @@ GLU_LDFLAGS = -lGLU
GLUT_LDFLAGS = -lglut -lXmu -lXi $(GLU_LDFLAGS) $(GL_LDFLAGS)
else
# ----------------------------------------------------------------------------
ifeq ($(patsubst IRIX%,IRIX,$(SYSTEM)), IRIX)
CC = cc
EXTRA_CCFLAGS =
ifeq ($(MAKECMDGOALS), 64)
EXTRA_CCFLAGS = -64
LIB.DIR = lib64
else
EXTRA_CCFLAGS = -n32
LIB.DIR = lib32
endif
EXTRA_LDFALGS =
EXTRA_CPPFLAGS = -DGLEW_NEEDS_CUSTOM_GET_PROCADDRESS=1
NAME = GLEW
@ -87,6 +98,7 @@ GL_LDFLAGS = -lGL -lXext -lX11 -lm
GLU_LDFLAGS = -lGLU
GLUT_LDFLAGS = -lglut -lXmu -lXi $(GLU_LDFLAGS) $(GL_LDFLAGS)
else
# ----------------------------------------------------------------------------
$(error "Platform '$(SYSTEM)' not supported")
endif
endif
@ -121,17 +133,17 @@ LIB.LIBS = $(GL_LDFLAGS)
BIN = glewinfo$(P.BIN)
BIN.SRCS = src/glewinfo.c
BIN.OBJS = $(BIN.SRCS:.c=.o)
BIN.LIBS = -Llib $(EXTRA_LDFALGS) $(GLUT_LDFLAGS) -l$(NAME)
BIN.LIBS = -Llib -l$(NAME) $(EXTRA_LDFALGS) $(GLUT_LDFLAGS)
all: lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(BIN)
all: $(LIB.DIR)/$(LIB.SHARED) $(LIB.DIR)/$(LIB.STATIC) bin/$(BIN)
lib/$(LIB.STATIC): $(LIB.OBJS)
$(LIB.DIR)/$(LIB.STATIC): $(LIB.OBJS)
$(AR) cr $@ $^
lib/$(LIB.SHARED): $(LIB.OBJS)
$(LIB.DIR)/$(LIB.SHARED): $(LIB.OBJS)
$(LD) -shared -o $@ $^ -soname $(LIB.SONAME) $(LIB.LDFLAGS) $(LIB.LIBS)
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
$(LN) $(LIB.SHARED) $(LIB.DIR)/$(LIB.SONAME)
$(LN) $(LIB.SHARED) $(LIB.DIR)/$(LIB.DEVLNK)
bin/$(BIN): $(BIN.SRCS)
$(CC) $(CFLAGS) -o $@ $^ $(BIN.LIBS)
@ -148,14 +160,14 @@ install: all
$(INSTALL) -d -m 0755 $(GLEW_DEST)/include/GL
$(INSTALL) -d -m 0755 $(GLEW_DEST)/lib
# runtime
$(INSTALL) $(STRIP) -m 0644 lib/$(LIB.SHARED) $(GLEW_DEST)/lib/
$(LN) $(LIB.SHARED) $(GLEW_DEST)/lib/$(LIB.SONAME)
$(INSTALL) $(STRIP) -m 0644 $(LIB.DIR)/$(LIB.SHARED) $(GLEW_DEST)/$(LIB.DIR)/
$(LN) $(LIB.SHARED) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.SONAME)
# development files
$(INSTALL) -m 0644 include/GL/wglew.h $(GLEW_DEST)/include/GL
$(INSTALL) -m 0644 include/GL/glew.h $(GLEW_DEST)/include/GL
$(INSTALL) -m 0644 include/GL/glxew.h $(GLEW_DEST)/include/GL
$(INSTALL) $(STRIP) -m 0644 lib/$(LIB.STATIC) $(GLEW_DEST)/lib/
$(LN) $(LIB.SHARED) $(GLEW_DEST)/lib/$(LIB.DEVLNK)
$(INSTALL) $(STRIP) -m 0644 $(LIB.DIR)/$(LIB.STATIC) $(GLEW_DEST)/$(LIB.DIR)/
$(LN) $(LIB.SHARED) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.DEVLNK)
# utilities
$(INSTALL) -s -m 0755 bin/$(BIN) $(GLEW_DEST)/bin/
@ -163,15 +175,15 @@ uninstall:
$(RM) $(GLEW_DEST)/include/GL/wglew.h
$(RM) $(GLEW_DEST)/include/GL/glew.h
$(RM) $(GLEW_DEST)/include/GL/glxew.h
$(RM) $(GLEW_DEST)/lib/$(LIB.DEVLNK)
$(RM) $(GLEW_DEST)/lib/$(LIB.SONAME)
$(RM) $(GLEW_DEST)/lib/$(LIB.SHARED)
$(RM) $(GLEW_DEST)/lib/$(LIB.STATIC)
$(RM) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.DEVLNK)
$(RM) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.SONAME)
$(RM) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.SHARED)
$(RM) $(GLEW_DEST)/$(LIB.DIR)/$(LIB.STATIC)
$(RM) $(GLEW_DEST)/bin/$(BIN)
clean:
$(RM) $(LIB.OBJS)
$(RM) lib/$(LIB.STATIC) lib/$(LIB.SHARED) lib/$(LIB.DEVLNK) lib/$(LIB.SONAME) $(LIB.STATIC)
$(RM) $(LIB.DIR)/$(LIB.STATIC) $(LIB.DIR)/$(LIB.SHARED) $(LIB.DIR)/$(LIB.DEVLNK) $(LIB.DIR)/$(LIB.SONAME) $(LIB.STATIC)
$(RM) $(BIN.OBJS) bin/$(BIN)
# Compiler droppings
$(RM) so_locations