mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 19:16:13 +03:00
build phobos as .so
This commit is contained in:
parent
113526f6b5
commit
96e36c665e
1 changed files with 13 additions and 0 deletions
13
posix.mak
13
posix.mak
|
@ -80,6 +80,7 @@ MAKEFILE:=$(lastword $(MAKEFILE_LIST))
|
|||
# Set DRUNTIME name and full path
|
||||
ifeq (,$(findstring win,$(OS)))
|
||||
DRUNTIME = $(DRUNTIME_PATH)/lib/libdruntime-$(OS)$(MODEL).a
|
||||
DRUNTIMESO = $(DRUNTIME_PATH)/lib/libdruntime-$(OS)$(MODEL)so.a
|
||||
else
|
||||
DRUNTIME = $(DRUNTIME_PATH)/lib/druntime.lib
|
||||
endif
|
||||
|
@ -151,6 +152,7 @@ DDOC=$(DMD)
|
|||
# Set LIB, the ultimate target
|
||||
ifeq (,$(findstring win,$(OS)))
|
||||
LIB = $(ROOT)/libphobos2.a
|
||||
LIBSO = $(ROOT)/libphobos2so.so
|
||||
else
|
||||
LIB = $(ROOT)/phobos.lib
|
||||
endif
|
||||
|
@ -229,8 +231,14 @@ ifeq ($(BUILD),)
|
|||
# targets. BUILD is not defined in user runs, only by recursive
|
||||
# self-invocations. So the targets in this branch are accessible to
|
||||
# end users.
|
||||
ifeq (linux,$(OS))
|
||||
release :
|
||||
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release PIC=1 dll
|
||||
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release
|
||||
else
|
||||
release :
|
||||
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=release
|
||||
endif
|
||||
debug :
|
||||
$(MAKE) --no-print-directory -f $(MAKEFILE) OS=$(OS) MODEL=$(MODEL) BUILD=debug
|
||||
unittest :
|
||||
|
@ -253,6 +261,11 @@ $(ROOT)/%$(DOTOBJ) : %.c
|
|||
$(LIB) : $(OBJS) $(ALL_D_FILES) $(DRUNTIME)
|
||||
$(DMD) $(DFLAGS) -lib -of$@ $(DRUNTIME) $(D_FILES) $(OBJS)
|
||||
|
||||
dll : $(LIBSO)
|
||||
|
||||
$(LIBSO): $(OBJS)
|
||||
$(DMD) $(DFLAGS) -shared -debuglib= -defaultlib= -of$@ $(DRUNTIMESO) $(D_FILES) $(OBJS)
|
||||
|
||||
ifeq (osx,$(OS))
|
||||
# Build fat library that combines the 32 bit and the 64 bit libraries
|
||||
libphobos2.a : generated/osx/release/32/libphobos2.a generated/osx/release/64/libphobos2.a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue