File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,13 @@ LIBS = unix
8
8
9
9
PATH = /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
10
10
11
- LDPATH =-L /usr/lib/ocaml/site-lib/pcre/ -L /usr/local/lib -L /usr/lib
11
+ LDPATH =-L /usr/lib/ocaml/site-lib/pcre/ -L /usr/local/lib -L /usr/lib
12
+
13
+ OCAML_PCRE =$(shell ocamlfind query pcre)
14
+ OCAML_STDLIB =$(shell ocamlfind query unix)
12
15
13
16
librange.so : camlcode.o librange.o
14
- ld -shared --whole-archive -o librange.so camlcode.o librange.o /usr/lib/ocaml/ libunix.a /usr/lib/ocaml/ libasmrun.a /usr/lib/ocaml/site-lib/pcre /libpcre_stubs.a -lm -lpcre -ldl
17
+ ld -fPIC -Bsymbolic - shared --whole-archive -o librange.so camlcode.o librange.o $( OCAML_STDLIB ) / libunix.a $( OCAML_STDLIB ) / libasmrun.a $( OCAML_PCRE ) /libpcre_stubs.a -lm -lpcre -ldl
15
18
16
19
17
20
# unused
@@ -27,10 +30,10 @@ install:
27
30
install -m 755 librange.so $(DESTDIR ) /usr/lib/
28
31
29
32
camlcode.o : ncl
30
- ocamlopt -I /usr/lib/ocaml/site-lib/pcre -output-obj -o camlcode.o unix.cmxa pcre.cmxa range_utils.cmx parser.cmx lexer.cmx memoize.cmx tinydns.cmx netmask.cmx admins.cmx netblocks.cmx hosts_netblocks.cmx evaluate.cmx range.cmx
33
+ ocamlopt -fPIC -I $( OCAML_PCRE ) -output-obj -o camlcode.o unix.cmxa pcre/ pcre.cmxa range_utils.cmx parser.cmx lexer.cmx memoize.cmx tinydns.cmx netmask.cmx admins.cmx netblocks.cmx hosts_netblocks.cmx evaluate.cmx range.cmx
31
34
32
35
librange.o : librange.c
33
- gcc -Wall -g -c librange.c -I /usr/lib/ocaml
36
+ gcc -fPIC - Wall -g -c librange.c -I $( OCAML_STDLIB )
34
37
35
38
cleaner : clean
36
39
rm -f librange.so librange.o testrange camlcode.o pcre_stubs.o
You can’t perform that action at this time.
0 commit comments