summaryrefslogtreecommitdiffstats
path: root/parted/Makefile.am
blob: e5f3288b1d6acf157191a717a7c3f444cae044b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
BUILT_SOURCES =

sbin_PROGRAMS = parted

AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
partedincludedir = \
  -I$(top_srcdir)/lib -I$(top_builddir)/include -I$(top_srcdir)/include

parted_SOURCES = command.c	\
		 command.h	\
		 parted.c	\
		 strlist.c	\
		 strlist.h	\
		 ui.c		\
		 ui.h		\
		 jsonwrt.c	\
		 jsonwrt.h	\
		 table.c	\
		 table.h

noinst_LIBRARIES = libver.a
nodist_libver_a_SOURCES = version.c version.h

BUILT_SOURCES += version.c
version.c: Makefile
	$(AM_V_GEN)rm -f $@
	$(AM_V_at)printf '#include <config.h>\n' > $@t
	$(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
	$(AM_V_at)chmod a-w $@t
	$(AM_V_at)mv $@t $@

BUILT_SOURCES += version.h
version.h: Makefile
	$(AM_V_GEN)rm -f $@
	$(AM_V_at)printf 'extern char const *Version;\n' > $@t
	$(AM_V_at)chmod a-w $@t
	$(AM_V_at)mv $@t $@

DISTCLEANFILES = version.c version.h
MAINTAINERCLEANFILES = $(BUILT_SOURCES)

parted_LDADD = \
  libver.a \
  $(top_builddir)/libparted/libparted.la \
  $(INTLLIBS) $(LIBS) \
  $(PARTED_LIBS)

parted_LDFLAGS = $(PARTEDLDFLAGS)

# Tell the linker to omit references to unused shared libraries.
parted_LDFLAGS += $(IGNORE_UNUSED_LIBRARIES_CFLAGS)

AM_CPPFLAGS = $(partedincludedir) $(INTLINCS)

MAINTAINERCLEANFILES += Makefile.in