$FreeBSD$ --- c_src/Makefile.orig +++ c_src/Makefile @@ -11,7 +11,7 @@ include ../win32_conf/mingw_vars.mk else - OGLDIR = /usr + OGLDIR = ${X11BASE} # Uncomment these if your opengl header is located in another directory than # the usual $(OGLDIR)/include/GL/gl.h @@ -21,14 +21,13 @@ GL_LIBS = -L$(OGLDIR)/lib -lGL -lGLU GL_INCS = -I$(OGLDIR)/include/$(GL_INCLUDE_DIR) - SDL_LIBS = $(shell sdl-config --libs) - SDL_INCS = $(shell sdl-config --cflags) + SDL_LIBS = $(shell $(SDL_CONFIG) --libs) + SDL_INCS = $(shell $(SDL_CONFIG) --cflags) LIBS = $(GL_LIBS) $(SDL_LIBS) -lm - CFLAGS = -g -O2 -funroll-loops -Wall -ffast-math -fpic \ - -fomit-frame-pointer $(USE_GL_INCLUDE_DIR) -DSHM \ - -DPTHREADS $(GL_INCS) $(SDL_INCS) $(ERL_INCS) + CFLAGS += -O2 -funroll-loops -Wall -ffast-math -fpic -fomit-frame-pointer \ + $(USE_GL_INCLUDE_DIR) -DSHM -DPTHREADS $(GL_INCS) $(SDL_INCS) $(ERL_INCS) CLINKFLAGS = -fpic -shared @@ -38,13 +37,13 @@ ERL_DIR := $(shell echo 'io:format("~s~n",[code:root_dir()]),halt().' | erl | grep '1>' | sed 's,^[0-9]*> *,,g') ERL_INCS = -I$(ERL_DIR)/usr/include - CC = gcc + CC ?= gcc endif TARGETDIR = ../priv -GCC_O = $(CC) -c $(CFLAGS) $< +GCC_O = $(CC) -c $(CFLAGS) $(INCS) $(ERLINC) $< # Files