2000-10-22 00:36:14 +02:00
|
|
|
AROPT = crs
|
2003-06-05 18:07:25 +02:00
|
|
|
export_dynamic = -Wl,-E
|
2010-05-06 21:28:25 +02:00
|
|
|
# Use --enable-new-dtags to generate DT_RUNPATH instead of DT_RPATH.
|
|
|
|
# This allows LD_LIBRARY_PATH to still work when needed.
|
|
|
|
rpath = -Wl,-rpath,'$(rpathdir)',--enable-new-dtags
|
2000-10-22 00:36:14 +02:00
|
|
|
DLSUFFIX = .so
|
2003-05-19 19:51:01 +02:00
|
|
|
|
|
|
|
ifeq "$(findstring sparc,$(host_cpu))" "sparc"
|
|
|
|
CFLAGS_SL = -fPIC
|
|
|
|
else
|
2000-10-22 00:36:14 +02:00
|
|
|
CFLAGS_SL = -fpic
|
2003-05-19 19:51:01 +02:00
|
|
|
endif
|
1997-04-12 12:33:10 +02:00
|
|
|
|
2010-07-05 20:54:38 +02:00
|
|
|
# Rule for building a shared library from a single .o file
|
1997-04-12 12:33:10 +02:00
|
|
|
%.so: %.o
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
|