Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #470 from WalterBright/build-so-obj
Browse files Browse the repository at this point in the history
build shared object file
  • Loading branch information
MartinNowak committed Apr 5, 2013
2 parents e895276 + 412c00d commit bfec89c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions posix.mak
Expand Up @@ -67,6 +67,8 @@ OBJDIR=obj/$(MODEL)
DRUNTIME_BASE=druntime-$(OS)$(MODEL)
DRUNTIME=lib/lib$(DRUNTIME_BASE).a
DRUNTIMESO=lib/lib$(DRUNTIME_BASE).so
DRUNTIMESOOBJ=lib/lib$(DRUNTIME_BASE)so.o
DRUNTIMESOLIB=lib/lib$(DRUNTIME_BASE)so.a

DOCFMT=-version=CoreDdoc

Expand Down Expand Up @@ -94,7 +96,11 @@ OBJS= $(OBJDIR)/errno_c.o $(OBJDIR)/threadasm.o

######################## All of'em ##############################

ifeq (linux,$(OS))
target : import copy dll $(DRUNTIME) doc
else
target : import copy $(DRUNTIME) doc
endif

######################## Doc .html file generation ##############################

Expand Down Expand Up @@ -149,10 +155,14 @@ $(OBJDIR)/threadasm.o : src/core/threadasm.S
######################## Create a shared library ##############################

dll: override PIC:=-fPIC
dll: $(DRUNTIMESO)
dll: $(DRUNTIMESOLIB)

$(DRUNTIMESO): $(OBJS) $(SRCS)
$(DMD) -shared -debuglib= -defaultlib= -of$(DRUNTIMESO) -Xfdruntime.json $(DFLAGS) $(SRCS) $(OBJS)
$(DMD) -shared -debuglib= -defaultlib= -of$(DRUNTIMESO) $(DFLAGS) $(SRCS) $(OBJS)

$(DRUNTIMESOLIB): $(OBJS) $(SRCS)
$(DMD) -c -fPIC -of$(DRUNTIMESOOBJ) $(DFLAGS) $(SRCS)
$(DMD) -lib -of$(DRUNTIMESOLIB) $(DRUNTIMESOOBJ) $(OBJS)

################### Library generation #########################

Expand Down

0 comments on commit bfec89c

Please sign in to comment.