From a1526a3e7dda31e236985ab465a5befa298eef26 Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Mon, 17 Oct 2005 18:52:43 +0000 Subject: added first part of the autoconf stuff - patch from Christian Hamar --- lib/libalpm/Makefile | 40 ------------------------------- lib/libalpm/Makefile.am | 31 +++++++++++++++++++++++++ lib/libalpm/alpm.h | 2 +- lib/libftp/Makefile | 62 ------------------------------------------------- lib/libftp/Makefile.am | 17 ++++++++++++++ 5 files changed, 49 insertions(+), 103 deletions(-) delete mode 100644 lib/libalpm/Makefile create mode 100644 lib/libalpm/Makefile.am delete mode 100644 lib/libftp/Makefile create mode 100644 lib/libftp/Makefile.am (limited to 'lib') diff --git a/lib/libalpm/Makefile b/lib/libalpm/Makefile deleted file mode 100644 index 1f021776..00000000 --- a/lib/libalpm/Makefile +++ /dev/null @@ -1,40 +0,0 @@ - -CXX=gcc -CFLAGS=-g -Wall -pedantic -D_GNU_SOURCE -I. -I../.. -AR=ar rc -RAN=ranlib - -OBJS=md5driver.o \ - md5.o \ - util.o \ - list.o \ - log.o \ - error.o \ - package.o \ - group.o \ - db.o \ - cache.o \ - conflict.o \ - deps.o \ - provide.o \ - rpmvercmp.o \ - backup.o \ - trans.o \ - add.o \ - remove.o \ - sync.o \ - handle.o \ - alpm.o - -all: libalpm.a - -%.o: %.c %.h - $(CXX) -c $(CFLAGS) -o $@ $< - -libalpm.a: $(OBJS) alpm.h - $(AR) $@ $(OBJS) - $(RAN) $@ - -clean: - rm -f *.o *~ core - rm -f libalpm.a diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am new file mode 100644 index 00000000..57a8356b --- /dev/null +++ b/lib/libalpm/Makefile.am @@ -0,0 +1,31 @@ +AUTOMAKE_OPTIONS = gnu +DEFINES = -pedantic -D_GNU_SOURCE +AM_CFLAGS = $(DEFINES) + +TARGETS = md5driver.c \ + md5.c \ + util.c \ + list.c \ + log.c \ + error.c \ + package.c \ + group.c \ + db.c \ + cache.c \ + conflict.c \ + deps.c \ + provide.c \ + rpmvercmp.c \ + backup.c \ + trans.c \ + add.c \ + remove.c \ + sync.c \ + handle.c \ + alpm.c + +lib_LTLIBRARIES = libalpm.la + +libalpm_la_SOURCES = $(TARGETS) + +libalpm_la_LDFLAGS = -no-undefined -version-info $(PM_VERSION_INFO) diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index b12defee..5ba0e1d7 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -25,7 +25,7 @@ * Arch Linux Package Management library */ -#define PM_VERSION "0.1.0" +/* #define PM_VERSION "0.1.0" */ /* Comes from autoconf's config.h */ #define PM_ROOT "/" #define PM_DBPATH "var/lib/pacman" diff --git a/lib/libftp/Makefile b/lib/libftp/Makefile deleted file mode 100644 index bf17940c..00000000 --- a/lib/libftp/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# -# This makefile contains modifications submitted by Richard Braakman -# (dark@xs4all.nl) for the shared library generation. -# - -# By default, ftplib uses PASV. If you need it to use PORT -# instead, uncomment the next line -DEFINES = -DFTPLIB_DEFMODE=FTPLIB_PORT - -SONAME = 3 -SOVERSION = $(SONAME).1 - -TARGETS = libftp.a libftp.so -OBJECTS = ftplib.o -SOURCES = ftplib.c - -CFLAGS = -Wall $(DEBUG) -I. $(INCLUDES) $(DEFINES) -LDFLAGS = -L. -DEPFLAGS = - -#all : $(TARGETS) -all : libftp.a - -clean : - rm -f $(OBJECTS) core *.bak - rm -rf unshared - -clobber : clean - rm -f $(TARGETS) .depend - rm -f libftp.so.* - -install : all - install -m 644 libftp.so.$(SOVERSION) /usr/local/lib - install -m 644 ftplib.h /usr/local/include - (cd /usr/local/lib && \ - ln -sf libftp.so.$(SOVERSION) libftp.so.$(SONAME) && \ - ln -sf libftp.so.$(SONAME) libftp.so) - -depend : - $(CC) $(CFLAGS) -M $(SOURCES) > .depend - -# build without -fPIC -unshared/ftplib.o: ftplib.c ftplib.h - -mkdir unshared - $(CC) -c $(CFLAGS) -D_REENTRANT $< -o $@ - -ftplib.o: ftplib.c ftplib.h - $(CC) -c $(CFLAGS) -fPIC -D_REENTRANT $< -o $@ - -libftp.a: unshared/ftplib.o - ar -rcs $@ $< - -libftp.so.$(SOVERSION): ftplib.o - $(CC) -shared -Wl,-soname,libftp.so.$(SONAME) -lc -o $@ $< - -libftp.so: libftp.so.$(SOVERSION) - ln -sf $< libftp.so.$(SONAME) - ln -sf $< $@ - -ifeq (.depend,$(wildcard .depend)) -include .depend -endif diff --git a/lib/libftp/Makefile.am b/lib/libftp/Makefile.am new file mode 100644 index 00000000..b53e4972 --- /dev/null +++ b/lib/libftp/Makefile.am @@ -0,0 +1,17 @@ +AUTOMAKE_OPTIONS = gnu +DEFINES = -DFTPLIB_DEFMODE=FTPLIB_PORT -D_REENTRANT +AM_CFLAGS = $(DEFINES) + +#SOMAJOR = 3 +#SOMINOR = 1 +#SOMICRO = 1 +#SOVER = `expr $(SOMAJOR) + $(SOMINOR)`:$(SOMICRO):$(SOMINOR) + +noinst_LTLIBRARIES = libftp.la +#lib_LTLIBRARIES = libftp.la + +libftp_la_SOURCES = \ + ftplib.h \ + ftplib.c + +#libftp_la_LDFLAGS = -L. -version-info $(SOVER) -- cgit v1.2.3-24-g4f1b