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

Commit

Permalink
build shared object file
Browse files Browse the repository at this point in the history
  • Loading branch information
WalterBright committed Apr 4, 2013
1 parent e895276 commit 412c00d
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 412c00d

Please sign in to comment.