|
From: Anders J. <and...@us...> - 2003-11-03 14:54:03
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Tag Comment ---- ----------- ----------- --- ------- Makefile 1.15 1.16=20=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Build openbt library. Will probably need some code cleanup to make one=20 common includefile for the library. The diff of the modified file(s): --- Makefile 2002/09/27 12:59:02 1.15 +++ Makefile 2003/11/03 14:54:01 1.16 @@ -5,6 +5,19 @@ AXIS_USABLE_LIBS =3D UCLIBC GLIBC =20 PROGS =3D btdm memul bti btinq btcon btdisc btconfig btping btsec # bt= send bttest =20 +# The name of the main library target. +ifeq ($(AXIS_SHARE_LIBS), yes) +LIBRARY_NAME =3D libopenbt.so +CFLAGS +=3D -fpic +PERM =3D -m 0755 +else +LIBRARY_NAME =3D libopenbt.a +PERM =3D -m 0644 +endif + +incdir =3D $(prefix)/include +libdir =3D $(prefix)/lib + # Define HAVE_READLINE_READLINE if you have readline support, with the inc= lude # files in $(include_dir)/readline. Define HAVE_READLINE if you have the # include files in $(include_dir). Define neither if you do not want to use @@ -21,16 +34,18 @@ INSTMODE =3D 0755 INSTOWNER =3D root INSTGROUP =3D root =20 -BTDOBJS =3D btd.o bt_ipa.o bt_vendor.o bt_if.o bt_misc.o -MEMULOBJS =3D modememul.o bt_if.o bt_misc.o -BTINITOBJS =3D btinit.o bt_vendor.o bt_if.o bt_misc.o -BTCONOBJS =3D btcon.o bt_if.o bt_misc.o -BTSENDOBJS =3D btsend.o bt_if.o bt_misc.o -BTDISCOBJS =3D btdisc.o bt_if.o bt_misc.o -BTINQOBJS =3D btinq.o bt_if.o bt_misc.o -BTTESTOBJS =3D bttest.o bt_misc.o bt_vendor.o bt_if.o -BTCONFIGOBJS =3D btconfig.o bt_vendor.o bt_if.o bt_misc.o -BTPINGOBJS =3D btping.o bt_if.o bt_misc.o +LIBOPENBTOBJS =3D bt_if.o bt_misc.o bt_vendor.o +HSOURCES =3D bt_if.h bt_vendor.h bt_misc.h bt_conf.h +BTDOBJS =3D btd.o bt_ipa.o +MEMULOBJS =3D modememul.o +BTINITOBJS =3D btinit.o +BTCONOBJS =3D btcon.o=20 +BTSENDOBJS =3D btsend.o=20 +BTDISCOBJS =3D btdisc.o=20 +BTINQOBJS =3D btinq.o=20 +BTTESTOBJS =3D bttest.o +BTCONFIGOBJS =3D btconfig.o +BTPINGOBJS =3D btping.o BTSECOBJS =3D btsec.o bt_linkkey_common.o =20 ifdef HAVE_READLINE_READLINE @@ -53,11 +68,22 @@ endif =20 CFLAGS +=3D -MMD =20 -all: $(PROGS) +LDLIBS +=3D -L./ -lopenbt + +all: $(LIBRARY_NAME) $(PROGS) =20 # 'btdm' =3D> 'multipoint btd' instead of btd to differentiate from=20 # standard btd while testing new btd =20 +libopenbt.so: $(LIBOPENBTOBJS) + rm -f $@ + $(CC) -shared -o $@ $(LIBOPENBTOBJS) + +libopenbt.a: $(LIBOPENBTOBJS) + rm -f $@ + $(AR) ucvr $@ $(LIBOPENBTOBJS) + $(RANLIB) $@ + btdm: $(BTDOBJS) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ =20 @@ -94,8 +120,9 @@ btsec: $(BTSECOBJS) install: $(PROGS) $(INSTALL) -d $(INSTDIR) $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INST= DIR) - + $(INSTALL) $(HSOURCES) $(incdir) + $(INSTALL) $(PERM) $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME) clean: - rm -f $(PROGS) *.o *.d core + rm -f $(PROGS) *.o *.d core *.so *.a =20 -include *.d |