2000-12-07 20:43:49 +01:00
|
|
|
AROPT = cr
|
2000-10-22 00:36:14 +02:00
|
|
|
|
2000-03-08 02:58:46 +01:00
|
|
|
ifdef ELF_SYSTEM
|
2000-10-07 20:43:23 +02:00
|
|
|
export_dynamic = -Wl,-E
|
2005-12-09 22:19:36 +01:00
|
|
|
rpath = -Wl,-R'$(rpathdir)'
|
2001-06-20 22:15:45 +02:00
|
|
|
else
|
2005-12-09 22:19:36 +01:00
|
|
|
rpath = -Wl,-R'$(rpathdir)'
|
2000-03-08 02:58:46 +01:00
|
|
|
endif
|
2000-10-22 00:36:14 +02:00
|
|
|
|
|
|
|
DLSUFFIX = .so
|
2004-10-12 01:27:23 +02:00
|
|
|
|
|
|
|
CFLAGS_SL = -fPIC -DPIC
|
|
|
|
|
2000-10-22 00:36:14 +02:00
|
|
|
|
2010-07-05 20:54:38 +02:00
|
|
|
# Rule for building a shared library from a single .o file
|
2000-03-08 02:58:46 +01:00
|
|
|
%.so: %.o
|
|
|
|
ifdef ELF_SYSTEM
|
2010-07-05 20:54:38 +02:00
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -shared -o $@ $<
|
2000-03-08 02:58:46 +01:00
|
|
|
else
|
|
|
|
$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
|
|
|
|
@echo building shared object $@
|
|
|
|
@rm -f $@.pic
|
2006-04-19 18:32:08 +02:00
|
|
|
@${AR} cq $@.pic $<.obj
|
2000-03-08 02:58:46 +01:00
|
|
|
${RANLIB} $@.pic
|
|
|
|
@rm -f $@
|
2004-10-12 01:27:23 +02:00
|
|
|
$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
|
2000-03-08 02:58:46 +01:00
|
|
|
endif
|