$FreeBSD$ --- Makefile.orig +++ Makefile @@ -121,17 +121,17 @@ # ---------------------------------------------------------------------------- ifeq ($(patsubst FreeBSD%,FreeBSD,$(SYSTEM)), FreeBSD) NAME = GLEW -CC = cc -LD = ld +CC ?= cc +LD ?= ld ifneq (undefined, $(origin GLEW_MX)) CFLAGS.EXTRA = -DGLEW_MX endif LDFLAGS.SO = -shared -soname $(LIB.SONAME) -LDFLAGS.EXTRA = -L/usr/X11R6/lib +LDFLAGS.EXTRA = -L${X11BASE}/lib LDFLAGS.GL = -lXmu -lXi -lGLU -lGL -lXext -lX11 LDFLAGS.STATIC = -Wl,-Bstatic LDFLAGS.DYNAMIC = -Wl,-Bdynamic -CFLAGS.EXTRA += -I/usr/X11R6/include +CFLAGS.EXTRA += -I${X11BASE}/include -fPIC NAME = GLEW WARN = -Wall -W POPT = -O2 @@ -245,7 +245,7 @@ STRIP = -s endif INCLUDE = -Iinclude -CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA) +CFLAGS += $(OPT) $(WARN) $(INCLUDE) $(CFLAGS.EXTRA) LIB.SRCS = src/glew.c LIB.OBJS = $(LIB.SRCS:.c=.o)