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
|
AROPT = crs
ifeq ($(with_gnu_ld), yes)
export_dynamic = -Wl,-E
else
export_dynamic = -Wl,-Bexport
endif
ifeq ($(ld_R_works), yes)
ifeq ($(with_gnu_ld), yes)
# Convert the list of library search paths into -rpath options
# (i.e. "-LpathA -LpathB" -> ",-rpath,pathA,-rpath,pathB"), adding
# the contents of LD_LIBRARY_PATH if it exists.
tpath1=$(shell echo $(trpath) | sed -e 's/ *-L/,-rpath,/g')
ifdef LD_LIBRARY_PATH
tpath2 = ,-rpath,tpath+=$(shell echo $(LD_LIBRARY_PATH) | sed -e 's/:/,-rpath,/g')
endif
rpath = -Wl,-rpath,$(libdir)$(tpath)$(tpath2)
else
# Convert the list of library search paths into a -R option path
# (i.e. "-LpathA -LpathB" -> ":pathA:pathB"), adding the contents of
# LD_LIBRARY_PATH if it exists.
tpath1 = $(shell echo $(trpath) | sed -e 's/ *-L/:/g')
ifdef LD_LIBRARY_PATH
tpath2 = :$(LD_LIBRARY_PATH)
endif
rpath = -Wl,-R$(libdir)$(tpath1)$(tpath2)
endif
endif
shlib_symbolic = -Wl,-Bsymbolic
DLSUFFIX = .so
ifeq ($(GCC), yes)
CFLAGS_SL = -fpic
else
CFLAGS_SL = -K PIC
endif
ifeq ($(GCC), yes)
SO_FLAGS = -shared
else
SO_FLAGS = -G
endif
%.so: %.o
$(CC) $(SO_FLAGS) -o $@ $<
sqlmansect = 5sql
|