Page MenuHomeClusterLabs Projects

libs.mk
No OneTemporary

# handle objects
ifndef OBJS
OBJS = $(TARGET).o
endif
# we always build the static version
ifndef STATICLIB
STATICLIB = $(TARGET).a
endif
# handle the shared version
ifndef MAKESTATICLIB
ifndef LIBDIRT
LIBDIRT=$(TARGET).a \
$(TARGET).so.$(SOMAJOR).$(SOMINOR)
endif
ifndef LIBSYMT
LIBSYMT=$(TARGET).so \
$(TARGET).so.$(SOMAJOR)
endif
ifndef INCDIRT
INCDIRT=$(TARGET).h
endif
ifndef SHAREDLIB
SHAREDLIB=$(TARGET).so.${SOMAJOR}.${SOMINOR}
endif
all: $(STATICLIB) $(SHAREDLIB)
$(SHAREDLIB): $(OBJS)
$(CC) -shared -o $@ -Wl,-soname=$(TARGET).so.$(SOMAJOR) $^ $(LDFLAGS)
ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so
ln -sf $(TARGET).so.$(SOMAJOR).$(SOMINOR) $(TARGET).so.$(SOMAJOR)
else
all: $(STATICLIB)
endif
$(STATICLIB): $(OBJS)
${AR} cru $@ $^
${RANLIB} $@
clean: generalclean
-include $(OBJS:.o=.d)

File Metadata

Mime Type
text/x-makefile
Expires
Sat, Jan 25, 12:10 PM (19 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1322508
Default Alt Text
libs.mk (848 B)

Event Timeline