Browse Source

- switched all the ser libraries to the new ser lib build system

Andrei Pelinescu-Onciul 18 years ago
parent
commit
ab0ae9dd14

+ 13 - 13
lib/Makefile

@@ -1,15 +1,11 @@
-# variables to change
+#  $Id$
+#
+#  libs makefile
+#
+# This makefile multiplexes the original goal to all the libraries listed in 
+# SUBDIRS.
+#
 
-INCLUDES += -I$(CURDIR)
-LIBS     += -L$(CURDIR)/cds -L$(CURDIR)/qsa
-DEFS     += -Wall
-
-####################################
-# make rules
-
-export LIBS
-export DEFS
-export INCLUDES
 
 SUBDIRS=binrpc cds xcap presence
 
@@ -17,10 +13,14 @@ SUBDIRS=binrpc cds xcap presence
 
 # clean install tags proper
 
-subdirs:	$(SUBDIRS)
+
+# we need sub_goals without 'all' target
+sub_goals = $(patsubst all,,$(MAKECMDGOALS))
+
+subdirs: $(SUBDIRS)
 
 $(SUBDIRS):	
-			@echo "Making $(MAKECMDGOALS) in $@" ; $(MAKE) $(MAKECMDGOALS) -C $@
+			-@echo "Making $(sub_goals) in $@" ; $(MAKE) $(sub_goals) -C $@
 
 all:	subdirs
 

+ 32 - 0
lib/Makefile.nonser

@@ -0,0 +1,32 @@
+# variables to change
+
+INCLUDES += -I$(CURDIR)
+LIBS     += -L$(CURDIR)/cds -L$(CURDIR)/qsa
+DEFS     += -Wall
+
+####################################
+# make rules
+
+export LIBS
+export DEFS
+export INCLUDES
+
+SUBDIRS=binrpc cds xcap presence
+
+.PHONY: subdirs $(SUBDIRS) 
+
+# clean install tags proper
+
+subdirs:	$(SUBDIRS)
+
+$(SUBDIRS):	
+			@echo "Making $(MAKECMDGOALS) in $@" ; $(MAKE) $(MAKECMDGOALS) -C $@
+
+all:	subdirs
+
+proper:	clean
+
+clean:	subdirs
+
+install:	subdirs
+

+ 0 - 55
lib/Makefile.ser

@@ -1,55 +0,0 @@
-include ../Makefile.defs
-
-# variables to change
-
-CFLAGS   :=${MOD_CFLAGS} -Wall
-DEFS     += -DSER
-ser      = $(CURDIR)/..
-
-INCLUDES += -I$(CURDIR) -I$(ser)
-LIBS     += -L$(CURDIR)/cds -L$(CURDIR)/qsa
-
-####################################
-# make rules
-
-
-# exports needed by libraries (this exports here allow to run make
-# in libraries independently on make in main ser directory)
-export INSTALL INSTALL-CFG INSTALL-BIN INSTALL-MODULES INSTALL-DOC INSTALL-MAN 
-export INSTALL-TOUCH
-export modules-prefix 
-
-lib-dir     = lib/ser
-INSTALL-LIB = $(INSTALL-BIN)
-LIBDIR      = $(modules-prefix)/$(lib-dir)
-
-export INSTALL-LIB
-export LIBDIR
-export INCLUDES
-export LIBS
-export CFLAGS
-export DEFS
-
-SUBDIRS=binrpc cds xcap presence
-
-.PHONY: subdirs $(SUBDIRS) 
-
-# clean install tags proper
-
-subdirs:	$(SUBDIRS)
-
-# we need sub_goals without 'all' target
-#sub_goals = $(MAKECMDGOALS:all=)
-sub_goals = $(patsubst all,,$(MAKECMDGOALS))
-
-$(SUBDIRS):	
-			-@echo "Making $(sub_goals) in $@" ; $(MAKE) -f Makefile.ser $(sub_goals) -C $@
-
-all:	subdirs
-
-proper:	clean
-
-clean:	subdirs
-
-install:	subdirs
-

+ 0 - 54
lib/Makefile.ser.defs

@@ -1,54 +0,0 @@
-# working variables
-
-SRCS := $(wildcard *.c)
-HDRS := $(wildcard *.h)
-DEP_IN = $(SRCS) $(HDRS)
-OBJS := $(patsubst %.c,%.o,$(SRCS))
-
-# static libraries
-
-ifeq ($(OUT_TYPE),static-lib)
-
-$(OUT_NAME):	$(OBJS)
-		ar -r $@ $(OBJS)
-
-install:	$(OUT_NAME)
-
-endif
-
-# dynamic libraries
-
-ifeq ($(OUT_TYPE),lib)
-$(OUT_NAME):	$(OBJS)
-		$(CC) -shared $(DEFS) $(CFLAGS) $(INCLUDES) $(LIBS) -o $@ $(OBJS)
-
-install:	$(OUT_NAME) $(LIBDIR)
-			$(INSTALL-TOUCH) $(LIBDIR)/$(OUT_NAME)
-			$(INSTALL-LIB) $(OUT_NAME) $(LIBDIR)
-
-$(LIBDIR):
-		mkdir -p $(LIBDIR)
-endif
-
-# common rules 
-
-%.o:	%.c
-		$(CC) $(DEFS) $(CFLAGS) $(INCLUDES) -c $<
-
-.PHONY:	clean install proper
-
-proper: clean
-
-clean:
-		-@rm -f $(OUT_NAME) *.o *.so *.d core core.* *~ Makefile.deps
-
-
-ifneq ($(MAKECMDGOALS),clean)
--include $(SRCS:.c=.d)
-endif
-
-%.d:	%.c
-		@$(CC) -M $(DEFS) $(CFLAGS) $(INCLUDES) $< > $@.$$$$; \
-		sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
-		rm -f $@.$$$$
-

+ 13 - 11
lib/binrpc/Makefile

@@ -1,12 +1,14 @@
-# warning: set correct structure aligment!
-CFLAGS   += -ggdb -fPIC -malign-double
-
-# name of result executable or library
-NAME = binrpc
-
-# override using 'make lib-type=static'
-# TYPE=lib => shared or static library, executable otherwise
-TYPE = lib
-
-include ../Makefile.defs
+#
+# example library makefile
+#
+
+include ../../Makefile.defs
+auto_gen=
+NAME:=binrpc
+MAJOR_VER=0
+MINOR_VER=1
+BUGFIX_VER=0
+LIBS=
+
+include ../../Makefile.libs
 

+ 12 - 0
lib/binrpc/Makefile.nonser

@@ -0,0 +1,12 @@
+# warning: set correct structure aligment!
+CFLAGS   += -ggdb -fPIC -malign-double
+
+# name of result executable or library
+NAME = binrpc
+
+# override using 'make lib-type=static'
+# TYPE=lib => shared or static library, executable otherwise
+TYPE = lib
+
+include ../Makefile.defs
+

+ 0 - 8
lib/binrpc/Makefile.ser

@@ -1,8 +0,0 @@
-LIBNAME  = binrpc
-OUT_NAME = libbinrpc.so
-OUT_TYPE = lib
-
-CFLAGS += -g0 -O9 -fPIC
-
-include ../Makefile.ser.defs
-

+ 13 - 9
lib/cds/Makefile

@@ -1,12 +1,16 @@
-DEFS     += 
-INCLUDES +=
-LIBS     +=
+#
+# example library makefile
+#
 
-# name of result executable or library
-NAME = cds
+include ../../Makefile.defs
+auto_gen=
+NAME:=ser_cds
+MAJOR_VER=0
+MINOR_VER=1
+BUGFIX_VER=0
+DEFS+=-DSER
+INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../..
+LIBS=
 
-# TYPE=lib => shared or static library, executable otherwise
-TYPE = lib
-
-include ../Makefile.defs
+include ../../Makefile.libs
 

+ 12 - 0
lib/cds/Makefile.nonser

@@ -0,0 +1,12 @@
+DEFS     += 
+INCLUDES +=
+LIBS     +=
+
+# name of result executable or library
+NAME = cds
+
+# TYPE=lib => shared or static library, executable otherwise
+TYPE = lib
+
+include ../Makefile.defs
+

+ 0 - 6
lib/cds/Makefile.ser

@@ -1,6 +0,0 @@
-LIBNAME  = cds
-OUT_NAME = lib_ser_cds.so
-OUT_TYPE = lib
-
-include ../Makefile.ser.defs
-

+ 17 - 8
lib/presence/Makefile

@@ -1,12 +1,21 @@
-DEFS     += 
-INCLUDES += -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include
-LIBS     += -L/usr/local/lib -lxml2 -lcds
 
-# name of result executable or library
-NAME = presence
+# example library makefile
+#
 
-# TYPE=lib => shared or static library, executable otherwise
-TYPE = lib
+include ../../Makefile.defs
+auto_gen=
+NAME:=ser_presence
+MAJOR_VER=0
+MINOR_VER=1
+BUGFIX_VER=0
+DEFS+=-DSER
+libxml2_includes=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
+					-I$(LOCALBASE)/include
+libxml2_libs=-L$(LOCALBASE)/lib -lxml2
+INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. $(libxml2_includes) 
+LIBS=$(libxml2_libs)
+SERLIBPATH=..
+SER_LIBS=$(SERLIBPATH)/cds/ser_cds
 
-include ../Makefile.defs
+include ../../Makefile.libs
 

+ 12 - 0
lib/presence/Makefile.nonser

@@ -0,0 +1,12 @@
+DEFS     += 
+INCLUDES += -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include
+LIBS     += -L/usr/local/lib -lxml2 -lcds
+
+# name of result executable or library
+NAME = presence
+
+# TYPE=lib => shared or static library, executable otherwise
+TYPE = lib
+
+include ../Makefile.defs
+

+ 0 - 9
lib/presence/Makefile.ser

@@ -1,9 +0,0 @@
-LIBNAME  = presence
-OUT_NAME = lib_ser_presence.so
-OUT_TYPE = lib
-
-INCLUDES += -I/usr/include/libxml2
-LIBS     += -lxml2 -l_ser_cds
-
-include ../Makefile.ser.defs
-

+ 17 - 8
lib/xcap/Makefile

@@ -1,12 +1,21 @@
-DEFS     += 
-INCLUDES += -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include
-LIBS     += -L/usr/local/lib -lxml2 -lcurl -lcds
 
-# name of result executable or library
-NAME = xcap
+# example library makefile
+#
 
-# TYPE=lib => shared or static library, executable otherwise
-TYPE = lib
+include ../../Makefile.defs
+auto_gen=
+NAME:=ser_xcap
+MAJOR_VER=0
+MINOR_VER=1
+BUGFIX_VER=0
+DEFS+=-DSER
+libxml2_includes=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
+					-I$(LOCALBASE)/include
+libxml2_libs=-L$(LOCALBASE)/lib -lxml2
+INCLUDES= -I$(CURDIR)/.. -I$(CURDIR)/../.. $(libxml2_includes) 
+LIBS=$(libxml2_libs)
+SERLIBPATH=..
+SER_LIBS=$(SERLIBPATH)/cds/ser_cds
 
-include ../Makefile.defs
+include ../../Makefile.libs
 

+ 12 - 0
lib/xcap/Makefile.nonser

@@ -0,0 +1,12 @@
+DEFS     += 
+INCLUDES += -I/usr/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include
+LIBS     += -L/usr/local/lib -lxml2 -lcurl -lcds
+
+# name of result executable or library
+NAME = xcap
+
+# TYPE=lib => shared or static library, executable otherwise
+TYPE = lib
+
+include ../Makefile.defs
+

+ 0 - 8
lib/xcap/Makefile.ser

@@ -1,8 +0,0 @@
-LIBNAME  = xcap
-OUT_NAME = lib_ser_xcap.so
-OUT_TYPE = lib
-INCLUDES += -I/usr/include/libxml2
-LIBS     += -lxml2 -l_ser_cds
-
-include ../Makefile.ser.defs
-