1
0
Fork 0
mirror of https://github.com/pygos/pkg-utils.git synced 2024-11-21 20:39:46 +01:00

Cleanup automakefile structure

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-02-04 15:51:55 +01:00
parent 6a80140c59
commit deb7bb0d4e
3 changed files with 66 additions and 67 deletions

View file

@ -3,73 +3,10 @@ ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include -D_GNU_SOURCE
AM_CFLAGS = $(WARN_CFLAGS)
# helper libraries
libutil_a_SOURCES = lib/util/input_file.c lib/util/mkdir_p.c
libutil_a_SOURCES += lib/util/write_retry.c lib/util/read_retry.c
libutil_a_SOURCES += lib/util/canonicalize_name.c
libutil_a_SOURCES += include/util/util.h include/util/input_file.h
libfilelist_a_SOURCES = lib/filelist/dump_toc.c lib/filelist/image_entry.c
libfilelist_a_SOURCES += lib/filelist/image_entry_sort.c
libfilelist_a_SOURCES += include/filelist/image_entry.h
# application core
GLOBALHDR = include/pkgformat.h include/pkgreader.h
GLOBALHDR += include/compressor.h include/command.h include/pkgwriter.h
GLOBALHDR += include/pkgio.h
MAIN = main/pkg.c main/compressor.c main/command.c main/pkgreader.c
MAIN += main/pkgwriter.c main/pkgio_rd_image_entry.c main/pkg_unpack.c
pkg_SOURCES = $(GLOBALHDR) $(MAIN)
pkg_CFLAGS = $(AM_CFLAGS)
pkg_LDADD = libutil.a libfilelist.a
noinst_LIBRARIES = libutil.a libfilelist.a
bin_PROGRAMS = pkg
noinst_LIBRARIES =
bin_PROGRAMS =
EXTRA_DIST = autogen.sh
##### commands #####
# pack command
pkg_SOURCES += main/cmd/pack/filelist.c
pkg_SOURCES += main/cmd/pack/write_toc.c main/cmd/pack/write_files.c
pkg_SOURCES += main/cmd/pack/pack.h main/cmd/pack/pack.c
pkg_SOURCES += main/cmd/pack/desc.c main/cmd/pack/write_hdr.c
# dump command
pkg_SOURCES += main/cmd/dump/dump.c main/cmd/dump/dump.h
pkg_SOURCES += main/cmd/dump/dump_header.c
# install command
pkg_SOURCES += main/cmd/install/collect.c main/cmd/install/install.c
pkg_SOURCES += main/cmd/install/install.h main/cmd/install/pkglist.c
pkg_SOURCES += main/cmd/install/tsort.c
# unpack command
pkg_SOURCES += main/cmd/unpack.c
# help command
pkg_SOURCES += main/cmd/help.c
##### compressors #####
# dummy compressor
pkg_SOURCES += main/compressors/none.c
# zlib compressor
if WITH_ZLIB
pkg_SOURCES += main/compressors/zlib.c
pkg_CFLAGS += $(ZLIB_CFLAGS)
pkg_LDADD += $(ZLIB_LIBS)
endif
# lzma compressor
if WITH_LZMA
pkg_SOURCES += main/compressors/lzma.c
pkg_CFLAGS += $(XZ_CFLAGS)
pkg_LDADD += $(XZ_LIBS)
endif
include lib/Makemodule.am
include main/Makemodule.am

10
lib/Makemodule.am Normal file
View file

@ -0,0 +1,10 @@
libutil_a_SOURCES = lib/util/input_file.c lib/util/mkdir_p.c
libutil_a_SOURCES += lib/util/write_retry.c lib/util/read_retry.c
libutil_a_SOURCES += lib/util/canonicalize_name.c
libutil_a_SOURCES += include/util/util.h include/util/input_file.h
libfilelist_a_SOURCES = lib/filelist/dump_toc.c lib/filelist/image_entry.c
libfilelist_a_SOURCES += lib/filelist/image_entry_sort.c
libfilelist_a_SOURCES += include/filelist/image_entry.h
noinst_LIBRARIES += libutil.a libfilelist.a

52
main/Makemodule.am Normal file
View file

@ -0,0 +1,52 @@
pkg_SOURCES = include/pkgformat.h include/pkgreader.h include/pkgio.h
pkg_SOURCES += include/compressor.h include/command.h include/pkgwriter.h
pkg_SOURCES += main/pkg.c main/compressor.c main/command.c main/pkgreader.c
pkg_SOURCES += main/pkgwriter.c main/pkgio_rd_image_entry.c main/pkg_unpack.c
pkg_CFLAGS = $(AM_CFLAGS)
pkg_LDADD = libutil.a libfilelist.a
##### commands #####
# pack command
pkg_SOURCES += main/cmd/pack/filelist.c
pkg_SOURCES += main/cmd/pack/write_toc.c main/cmd/pack/write_files.c
pkg_SOURCES += main/cmd/pack/pack.h main/cmd/pack/pack.c
pkg_SOURCES += main/cmd/pack/desc.c main/cmd/pack/write_hdr.c
# dump command
pkg_SOURCES += main/cmd/dump/dump.c main/cmd/dump/dump.h
pkg_SOURCES += main/cmd/dump/dump_header.c
# install command
pkg_SOURCES += main/cmd/install/collect.c main/cmd/install/install.c
pkg_SOURCES += main/cmd/install/install.h main/cmd/install/pkglist.c
pkg_SOURCES += main/cmd/install/tsort.c
# unpack command
pkg_SOURCES += main/cmd/unpack.c
# help command
pkg_SOURCES += main/cmd/help.c
##### compressors #####
# dummy compressor
pkg_SOURCES += main/compressors/none.c
# zlib compressor
if WITH_ZLIB
pkg_SOURCES += main/compressors/zlib.c
pkg_CFLAGS += $(ZLIB_CFLAGS)
pkg_LDADD += $(ZLIB_LIBS)
endif
# lzma compressor
if WITH_LZMA
pkg_SOURCES += main/compressors/lzma.c
pkg_CFLAGS += $(XZ_CFLAGS)
pkg_LDADD += $(XZ_LIBS)
endif
bin_PROGRAMS += pkg