X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=helper%2FMakefile.am;h=fb356a4f1535d6ebb89c4132686d382ece4dc164;hb=66a9d53e48f14d7fe1d9f4b801a1c5582d83efa6;hp=3af1d64fef318ca7894a7e217d5fd6f372f70dca;hpb=f0893a62d46605305ae14baba6cae3eebffc6005;p=febootstrap.git diff --git a/helper/Makefile.am b/helper/Makefile.am index 3af1d64..fb356a4 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -23,13 +23,33 @@ bin_PROGRAMS = \ febootstrap_supermin_helper_SOURCES = \ helper.h \ appliance.c \ + checksum.c \ cpio.c \ ext2.c \ + ext2cpio.c \ + ext2initrd.c \ + ext2internal.h \ kernel.c \ main.c \ utils.c febootstrap_supermin_helper_CFLAGS = -Wall -I../lib -febootstrap_supermin_helper_LDADD = $(LTLIBINTL) -L../lib -lgnu +febootstrap_supermin_helper_LDADD = \ + ext2init.o -lext2fs -lcom_err $(LTLIBINTL) -L../lib -lgnu + +# init "script" used by ext2 initrd. +noinst_PROGRAMS = init +init_SOURCES = init.c +init_CFLAGS = -static +init_LDFLAGS = -all-static + +# http://www.doof.me.uk/2010/05/07/cute-objcopy-hack/ +ELF_DEFAULT_ARCH = $(shell $(srcdir)/elf-default-arch | gawk '{ print $$1 }') +DEFAULT_ARCH = $(shell $(srcdir)/elf-default-arch | gawk '{ print $$2 }') +ext2init.o: init + strip --strip-all $< + @file $< | grep -isq static || \ + (echo "*** error: init is not staticly linked"; exit 1) + objcopy -I binary -B $(DEFAULT_ARCH) -O $(ELF_DEFAULT_ARCH) $< $@ man_MANS = \ febootstrap-supermin-helper.8 @@ -43,11 +63,9 @@ febootstrap-supermin-helper.8: febootstrap-supermin-helper.pod --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ -febootstrap-supermin-helper.txt: febootstrap-supermin-helper.pod - pod2text $< > $@ - endif EXTRA_DIST = \ - febootstrap-supermin-helper.8 febootstrap-supermin-helper.txt \ - febootstrap-supermin-helper.pod + febootstrap-supermin-helper.8 \ + febootstrap-supermin-helper.pod \ + elf-default-arch