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 --- src/pacman/Makefile | 41 ----------------------------------------- src/pacman/Makefile.am | 20 ++++++++++++++++++++ src/pacman/pacman.c | 2 +- src/util/Makefile.am | 11 +++++++++++ 4 files changed, 32 insertions(+), 42 deletions(-) delete mode 100644 src/pacman/Makefile create mode 100644 src/pacman/Makefile.am create mode 100644 src/util/Makefile.am (limited to 'src') diff --git a/src/pacman/Makefile b/src/pacman/Makefile deleted file mode 100644 index a6b6cad2..00000000 --- a/src/pacman/Makefile +++ /dev/null @@ -1,41 +0,0 @@ - -CC=gcc -CFLAGS=-g -Wall -D_GNU_SOURCE -I. -I../.. -I../../lib/libalpm -I../../lib/libftp -LDFLAGS=-L../../lib/libalpm -lalpm -L../../lib/libftp -lftp -ltar -lz -AR=ar rc -RAN=ranlib - -OBJECTS=util.o \ - log.o \ - list.o \ - package.o \ - db.o \ - download.o \ - trans.o \ - add.o \ - remove.o \ - upgrade.o \ - query.o \ - sync.o \ - conf.o \ - pacman.o - -all: pacman - -%.o: %.c %.h - $(CC) -c $(CFLAGS) -o $@ $< - -pacman: $(OBJECTS) ../../lib/libalpm/libalpm.a ../../lib/libftp/libftp.a - $(CC) $(OBJECTS) -o $@ $(CFLAGS) $(LDFLAGS) -# $(CC) $(OBJECTS) -o $@.static $(CFLAGS) $(LDFLAGS) - -clean: - rm -f *.o *~ core - rm -f pacman pacman.static convertdb vercmp - -install: pacman vercmp convertdb - $(INSTALL) -D -m0755 pacman $(DESTDIR)$(BINDIR)/pacman - $(INSTALL) -D -m0755 pacman.static $(DESTDIR)$(BINDIR)/pacman.static - $(INSTALL) -D -m0755 vercmp $(DESTDIR)$(BINDIR)/vercmp - $(INSTALL) -D -m0755 convertdb $(DESTDIR)$(BINDIR)/convertdb - diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am new file mode 100644 index 00000000..f8450b86 --- /dev/null +++ b/src/pacman/Makefile.am @@ -0,0 +1,20 @@ +bin_PROGRAMS = pacman pacman.static + +AM_CFLAGS = -D_GNU_SOURCE \ + -I$(top_srcdir)/lib/libalpm \ + -I$(top_srcdir)/lib/libftp + +pacman_SOURCES = util.c log.c list.c package.c db.c download.c trans.c add.c \ + remove.c upgrade.c query.c sync.c conf.c pacman.c + +pacman_static_SOURCES = $(pacman_SOURCES) + +pacman_LDADD = \ + $(top_srcdir)/lib/libalpm/libalpm.la \ + $(top_srcdir)/lib/libftp/libftp.la + +pacman_static_LDADD = \ + $(top_srcdir)/lib/libalpm/.libs/libalpm.a \ + $(top_srcdir)/lib/libftp/.libs/libftp.a $(LDFLAGS) + +pacman_static_LDFLAGS = -all-static diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 983d8402..00be4b83 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -591,7 +591,7 @@ void usage(int op, char *myname) void version() { printf("\n"); - printf(" .--. Pacman v%s\n", PM_VERSION); + printf(" .--. Pacman v%s - libalpm v%s\n", PACMAN_VERSION, PM_VERSION); printf("/ _.-' .-. .-. .-. Copyright (C) 2002-2005 Judd Vinet \n"); printf("\\ '-. '-' '-' '-' \n"); printf(" '--' This program may be freely redistributed under\n"); diff --git a/src/util/Makefile.am b/src/util/Makefile.am new file mode 100644 index 00000000..8fd81471 --- /dev/null +++ b/src/util/Makefile.am @@ -0,0 +1,11 @@ +bin_PROGRAMS = vercmp convertdb + +AM_CFLAGS = \ + -I$(top_srcdir)/lib/libalpm \ + -I$(top_srcdir)/src/pacman + +vercmp_SOURCES = vercmp.c +convertdb_SOURCES = convertdb.c + +vercmp_LDADD = $(top_srcdir)/lib/libalpm/libalpm.la +convertdb_LDADD = $(top_srcdir)/lib/libalpm/libalpm.la -- cgit v1.2.3-70-g09d2