blob: 5133b713599233d30fa8412053beca5b31b84820 (
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
50
51
|
$NetBSD: patch-ae,v 1.5 2013/10/20 17:48:26 joerg Exp $
--- src/Hsml/Makefile.orig 2004-11-08 17:41:48.000000000 -0500
+++ src/Hsml/Makefile 2008-08-17 15:34:05.000000000 -0400
@@ -7,15 +7,16 @@ DEBUG=-g
DEFS+= -DINCORE_LUA=${INCORE_LUA}
DEFS+= -DPATH_JAVA=\"${JAVA}\"
DEFS+= -DPATH_CC=\"${PATH_CC}\"
-CFLAGS= -I/usr/pkg/include -I/usr/local/include ${DEBUG} ${DEFS}
+CFLAGS+= ${DEBUG} ${DEFS}
+PICFLAGS?=-fPIC
%.o: %.c
@echo "[hsml] $<"
- @${CC} $< -c ${CFLAGS} -o $@
+ @${CC} $< -c ${CFLAGS} ${PICFLAGS} -o $@
all: opts ${OBJ} langs
@echo "[hsml] LINKING..."
- @${CC} ${CFLAGS} ${OBJ} -o ${BIN} `cat .opts`
+ @${CC} ${CFLAGS} ${LDFLAGS} ${OBJ} -o ${BIN} `cat .opts`
@echo "-----------------"
clean:
@@ -24,7 +25,7 @@ clean:
opts:
echo > .opts
- if [ "${INCORE_LUA}" = "1" ]; then echo "-llualib -L /usr/pkg/lib -R /usr/pkg/lib -llua -lm " > .opts ; \
+ if [ "${INCORE_LUA}" = "1" ]; then echo "-L /usr/pkg/lib ${COMPILER_RPATH_FLAG}/usr/pkg/lib -llua -lm " > .opts ; \
else echo "" > .opts ; fi
if [ "`uname`" = "Linux" ]; then echo " -ldl " >> .opts ; fi
@@ -42,13 +43,13 @@ check:
langs:
@echo "[hsml] C lang module"
- @${CC} ${CFLAGS} lang_c.c -shared -o lang_c.so
+ @${CC} ${CFLAGS} ${PICFLAGS} lang_c.c -shared -o lang_c.so
@echo "[hsml] Perl lang module"
- @${CC} ${CFLAGS} lang_perl.c -shared -o lang_perl.so
+ @${CC} ${CFLAGS} ${PICFLAGS} lang_perl.c -shared -o lang_perl.so
@echo "[hsml] Python lang module"
- @${CC} ${CFLAGS} lang_python.c -shared -o lang_python.so
+ @${CC} ${CFLAGS} ${PICFLAGS} lang_python.c -shared -o lang_python.so
@echo "[hsml] Brainfuck lang module"
- @${CC} ${CFLAGS} lang_brainfuck.c -shared -o lang_brainfuck.so
+ @${CC} ${CFLAGS} ${PICFLAGS} lang_brainfuck.c -shared -o lang_brainfuck.so
modules_install:
install -c -m 0755 \
|