X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=helper%2FMakefile.am;fp=helper%2FMakefile.am;h=96b5581e3d00153c3e5c042bca5c7c140a16d406;hb=89e336ee166be538e376d288fb2b3fbbffd66d4c;hp=3af1d64fef318ca7894a7e217d5fd6f372f70dca;hpb=53bf430e26f4a53837bd38b58a427079caab3d4b;p=febootstrap.git diff --git a/helper/Makefile.am b/helper/Makefile.am index 3af1d64..96b5581 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -25,11 +25,29 @@ febootstrap_supermin_helper_SOURCES = \ appliance.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) +ext2init.o: init + strip --strip-all $< + @file $< | grep -isq static || \ + (echo "*** error: init is not staticly linked"; exit 1) + objcopy -I binary -B i386 -O $(ELF_DEFAULT_ARCH) $< $@ man_MANS = \ febootstrap-supermin-helper.8 @@ -50,4 +68,5 @@ endif EXTRA_DIST = \ febootstrap-supermin-helper.8 febootstrap-supermin-helper.txt \ - febootstrap-supermin-helper.pod + febootstrap-supermin-helper.pod \ + elf-default-arch