2009-08-21 21:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* config/linux/gcc.mk
+ Added experimental dynamic lib creation.
; Please review this. If okay we can probably move this logic
to all other *nix platforms and compilers.
Maybe even os2/gcc.
This commit is contained in:
@@ -17,6 +17,13 @@
|
||||
past entries belonging to author(s): Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-08-21 21:44 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* config/linux/gcc.mk
|
||||
+ Added experimental dynamic lib creation.
|
||||
; Please review this. If okay we can probably move this logic
|
||||
to all other *nix platforms and compilers.
|
||||
Maybe even os2/gcc.
|
||||
|
||||
2009-08-21 21:32 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* config/darwin/gcc.mk
|
||||
+ Added experimental dynamic lib creation.
|
||||
|
||||
@@ -83,4 +83,22 @@ AR := $(HB_CCPREFIX)ar
|
||||
ARFLAGS :=
|
||||
AR_RULE = $(AR) $(ARFLAGS) $(HB_USER_AFLAGS) crs $(LIB_DIR)/$@ $(^F) || ( $(RM) $(LIB_DIR)/$@ && false )
|
||||
|
||||
DY := $(CC)
|
||||
DFLAGS := -shared -fPIC
|
||||
DY_OUT := -o$(subst x,x, )
|
||||
DLIBS :=
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
define dyn_object
|
||||
@$(ECHO) $(ECHOQUOTE)$(subst \,/,$(file))$(ECHOQUOTE) >> __dyn__.tmp
|
||||
|
||||
endef
|
||||
define create_dynlib
|
||||
$(if $(wildcard __dyn__.tmp),@$(RM) __dyn__.tmp,)
|
||||
$(foreach file,$^,$(dyn_object))
|
||||
$(DY) $(DFLAGS) $(HB_USER_DFLAGS) $(DY_OUT)$(DYN_DIR)/$@ @__dyn__.tmp
|
||||
endef
|
||||
|
||||
DY_RULE = $(create_dynlib)
|
||||
|
||||
include $(TOP)$(ROOT)config/rules.mk
|
||||
|
||||
Reference in New Issue
Block a user