Move sources to src/ subdirectory

We have a number of source files now, so move them from the top level to
src/

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
This commit is contained in:
Jeremy Kerr 2012-08-13 14:54:12 +08:00
parent 5466f381dd
commit c7ee585439
22 changed files with 47 additions and 46 deletions

View file

@ -1,44 +1,2 @@
AM_CFLAGS = -Wall -Wextra --std=gnu99
bin_PROGRAMS = sbsign sbverify sbattach sbvarsign sbsiglist
coff_headers = coff/external.h coff/pe.h
common_SOURCES = idc.c idc.h image.c image.h fileio.c fileio.h \
efivars.h $(coff_headers)
common_LDADD = lib/ccan/libccan.a $(libcrypto_LIBS)
common_CFLAGS = -I$(srcdir)/lib/ccan/
sbsign_SOURCES = sbsign.c $(common_SOURCES)
sbsign_LDADD = $(common_LDADD)
sbsign_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbverify_SOURCES = sbverify.c $(common_SOURCES)
sbverify_LDADD = $(common_LDADD)
sbverify_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbattach_SOURCES = sbattach.c $(common_SOURCES)
sbattach_LDADD = $(common_LDADD)
sbattach_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbvarsign_SOURCES = sbvarsign.c $(common_SOURCES)
sbvarsign_LDADD = $(common_LDADD) $(uuid_LIBS)
sbvarsign_CPPFLAGS = $(EFI_CPPFLAGS)
sbvarsign_CFLAGS = $(AM_CFLAGS) $(uuid_CFLAGS) $(common_CFLAGS)
sbsiglist_SOURCES = sbsiglist.c $(common_SOURCES)
sbsiglist_LDADD = $(common_LDADD) $(uuid_LIBS)
sbsiglist_CPPFLAGS = $(EFI_CPPFLAGS)
sbsiglist_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
man1_MANS = docs/sbsign.1 docs/sbverify.1 docs/sbattach.1
EXTRA_DIST = docs/sbsign.1.in docs/sbverify.1.in docs/sbattach.1.in
CLEANFILES = $(man1_MANS)
$(top_builddir)/docs/%.1: $(srcdir)/docs/%.1.in $(top_builddir)/%
$(MKDIR_P) $(@D)
$(HELP2MAN) --no-info -i $< -o $@ $(top_builddir)/$*
SUBDIRS = lib/ccan . tests
SUBDIRS = lib/ccan src docs tests

View file

@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE()
AC_PREREQ(2.60)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_SRCDIR(sbsign.c)
AC_CONFIG_SRCDIR(src/sbsign.c)
AM_PROG_AS
AC_PROG_CC
@ -73,5 +73,6 @@ AC_CHECK_HEADERS([efi.h], [], [], $EFI_INCLUDES)
CPPFLAGS="$CPPFLAGS_save"
AC_SUBST(EFI_CPPFLAGS, $EFI_CPPFLAGS)
AC_CONFIG_FILES([Makefile lib/ccan/Makefile tests/Makefile])
AC_CONFIG_FILES([Makefile src/Makefile lib/ccan/Makefile]
[docs/Makefile tests/Makefile])
AC_OUTPUT

10
docs/Makefile.am Normal file
View file

@ -0,0 +1,10 @@
man1_MANS = sbsign.1 sbverify.1 sbattach.1
EXTRA_DIST = sbsign.1.in sbverify.1.in sbattach.1.in
CLEANFILES = $(man1_MANS)
$(builddir)/%.1: $(srcdir)/%.1.in $(top_builddir)/src/%
$(MKDIR_P) $(@D)
$(HELP2MAN) --no-info -i $< -o $@ $(top_builddir)/src/$*

32
src/Makefile.am Normal file
View file

@ -0,0 +1,32 @@
bin_PROGRAMS = sbsign sbverify sbattach sbvarsign sbsiglist
coff_headers = coff/external.h coff/pe.h
AM_CFLAGS = -Wall -Wextra --std=gnu99
common_SOURCES = idc.c idc.h image.c image.h fileio.c fileio.h \
efivars.h $(coff_headers)
common_LDADD = ../lib/ccan/libccan.a $(libcrypto_LIBS)
common_CFLAGS = -I$(top_srcdir)/lib/ccan/
sbsign_SOURCES = sbsign.c $(common_SOURCES)
sbsign_LDADD = $(common_LDADD)
sbsign_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbverify_SOURCES = sbverify.c $(common_SOURCES)
sbverify_LDADD = $(common_LDADD)
sbverify_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbattach_SOURCES = sbattach.c $(common_SOURCES)
sbattach_LDADD = $(common_LDADD)
sbattach_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)
sbvarsign_SOURCES = sbvarsign.c $(common_SOURCES)
sbvarsign_LDADD = $(common_LDADD) $(uuid_LIBS)
sbvarsign_CPPFLAGS = $(EFI_CPPFLAGS)
sbvarsign_CFLAGS = $(AM_CFLAGS) $(uuid_CFLAGS) $(common_CFLAGS)
sbsiglist_SOURCES = sbsiglist.c $(common_SOURCES)
sbsiglist_LDADD = $(common_LDADD) $(uuid_LIBS)
sbsiglist_CPPFLAGS = $(EFI_CPPFLAGS)
sbsiglist_CFLAGS = $(AM_CFLAGS) $(common_CFLAGS)

View file

View file

View file

@ -3,7 +3,7 @@
# set a few global variables that may be used by the test
basedir=$(cd $srcdir && pwd)
datadir=$(pwd)
bindir="$datadir/.."
bindir="$datadir/../src"
sbsign=$bindir/sbsign
sbverify=$bindir/sbverify