2019-01-19 17:26:41 +01:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/include -D_GNU_SOURCE
|
|
|
|
AM_CFLAGS = $(WARN_CFLAGS)
|
|
|
|
|
|
|
|
# application core
|
|
|
|
GLOBALHDR = include/pkgformat.h include/util.h include/pkgreader.h
|
|
|
|
GLOBALHDR += include/compressor.h include/command.h include/pkgwriter.h
|
2019-01-31 17:56:18 +01:00
|
|
|
GLOBALHDR += include/image_entry.h include/pkgio.h include/input_file.h
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
MAIN = main/pkg.c main/util.c main/compressor.c main/command.c main/pkgreader.c
|
|
|
|
MAIN += main/pkgwriter.c main/image_entry.c main/image_entry_sort.c
|
2019-01-30 13:26:05 +01:00
|
|
|
MAIN += main/mkdir_p.c main/pkgio_rd_image_entry.c main/pkg_unpack.c
|
2019-01-31 17:56:18 +01:00
|
|
|
MAIN += main/input_file.c
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
pkg_SOURCES = $(GLOBALHDR) $(MAIN)
|
|
|
|
pkg_CFLAGS = $(AM_CFLAGS)
|
|
|
|
pkg_LDADD =
|
|
|
|
|
|
|
|
bin_PROGRAMS = pkg
|
|
|
|
|
|
|
|
EXTRA_DIST = autogen.sh
|
|
|
|
|
|
|
|
##### commands #####
|
|
|
|
|
|
|
|
# pack command
|
|
|
|
pkg_SOURCES += main/cmd/pack/filelist.c main/cmd/pack/filelist_read.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
|
2019-01-31 17:56:18 +01:00
|
|
|
pkg_SOURCES += main/cmd/pack/desc.c main/cmd/pack/write_hdr.c
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
# dump command
|
|
|
|
pkg_SOURCES += main/cmd/dump/dump.c main/cmd/dump/dump.h main/cmd/dump/dump_toc.c
|
2019-01-29 00:14:06 +01:00
|
|
|
pkg_SOURCES += main/cmd/dump/dump_header.c
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
# unpack command
|
2019-01-30 13:48:58 +01:00
|
|
|
pkg_SOURCES += main/cmd/unpack.c
|
2019-01-19 17:26:41 +01:00
|
|
|
|
|
|
|
# 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
|
2019-01-27 00:43:05 +01:00
|
|
|
|
|
|
|
# lzma compressor
|
|
|
|
if WITH_LZMA
|
|
|
|
pkg_SOURCES += main/compressors/lzma.c
|
|
|
|
|
|
|
|
pkg_CFLAGS += $(XZ_CFLAGS)
|
|
|
|
pkg_LDADD += $(XZ_LIBS)
|
|
|
|
endif
|