File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -6,22 +6,23 @@ JWTCFLAGS=$(shell pkg-config --cflags libjwt)
6
6
SSLLDFLAGS =-lssl -lcrypto
7
7
SSLCFLAGS =
8
8
CFLAGS =-D_GNU_SOURCE $(JWTCFLAGS ) $(SSLCFLAGS ) -pedantic -Wall -Wno-unused-result -fpic -c
9
- LDFLAGS =$(JWTLDFLAGS ) $(SSLLDFLAGS ) -shared
9
+ LDFLAGS =$(JWTLDFLAGS ) $(SSLLDFLAGS ) -shared -Wl,-rpath='$$ORIGIN'
10
10
11
11
LIBEXT =$(shell swipl -q -g 'current_prolog_flag(shared_object_extension, Ext) , writeln(Ext)' -t halt)
12
12
LIBNAME =jwt_io
13
+ TARGET =lib/x86_64-linux/$(LIBNAME ) .$(LIBEXT )
13
14
14
15
testfiles := $(wildcard tests/* .plt)
15
16
16
- all : $(LIBNAME ) . $( LIBEXT )
17
+ all : $(TARGET )
17
18
18
- $(LIBNAME ) . $( LIBEXT ) : src/$(LIBNAME ) .o
19
- swipl-ld $(LDFLAGS ) -o $@ $<
19
+ $(TARGET ) : src/$(LIBNAME ) .o
20
+ gcc $(LDFLAGS ) -o $@ $<
20
21
21
22
% .o : % .c
22
23
swipl-ld $(CFLAGS ) $<
23
24
24
- check : $(LIBNAME ) . $( LIBEXT ) $(testfiles )
25
+ check : $(TARGET ) $(testfiles )
25
26
26
27
% .plt : FORCE
27
28
swipl -s $@ -g run_tests -t halt
Original file line number Diff line number Diff line change 67
67
@license BSD
68
68
*/
69
69
70
- :- use_foreign_library(jwt_io ).
70
+ :- use_foreign_library(foreign( jwt_io ) ).
71
71
72
72
:- use_module (library(http /json )).
73
73
:- use_module (library(settings )).
You can’t perform that action at this time.
0 commit comments