blob: 23f706f984fd29b7f42180b7aa62592b948af797 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
$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
|