summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-06-09 11:23:09 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-06-09 12:26:53 -1000
commitdbedeb95cea3cd335f9f66a0cc6adf1589814358 (patch)
treed7e6db995d58bed4097579df6c90bce20c5e9015
parent98e68eba079ab7dd927270d4fc9bd3eeb1b9f9be (diff)
downloadanaconda-dbedeb95cea3cd335f9f66a0cc6adf1589814358.tar.gz
anaconda-dbedeb95cea3cd335f9f66a0cc6adf1589814358.tar.xz
anaconda-dbedeb95cea3cd335f9f66a0cc6adf1589814358.zip
Convert loader/ to Makefile.am
-rw-r--r--loader/Makefile158
-rw-r--r--loader/Makefile.am92
2 files changed, 92 insertions, 158 deletions
diff --git a/loader/Makefile b/loader/Makefile
deleted file mode 100644
index 861604c3e..000000000
--- a/loader/Makefile
+++ /dev/null
@@ -1,158 +0,0 @@
-#
-# Makefile
-#
-# Copyright (C) 2007 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-
-include ../Makefile.inc
-VERSION := $(shell awk '/Version:/ { print $$2 }' ../anaconda.spec)
-
-ifeq (.depend,$(wildcard .depend))
-TARGET=$(PROGS)
-else
-TARGET=depend $(PROGS)
-endif
-
-LIBS = -lnewt -lslang -lz -lpopt ../isys/libisys.a -lcheckisomd5 -liscsi
-
-# devmapper
-LIBS += $(shell pkg-config --libs devmapper)
-CFLAGS += $(shell pkg-config --cflags devmapper)
-
-# libnl
-LIBS += $(shell pkg-config --libs libnl-1)
-CFLAGS += $(shell pkg-config --cflags libnl-1)
-
-# NetworkManager
-CFLAGS += $(shell pkg-config --cflags NetworkManager)
-
-# libnm-glib
-CFLAGS += $(shell pkg-config --cflags libnm_glib)
-LIBS += $(shell pkg-config --libs libnm_glib)
-
-ifeq (1, $(USESELINUX))
-LIBS += -lselinux -lsepol
-endif
-
-# These libs need to be on the end of the link list
-LIBS += -lresolv -lm
-
-BINS = loader
-
-HWOBJS = hardware.o
-METHOBJS = method.o cdinstall.o hdinstall.o nfsinstall.o urlinstall.o
-OBJS = copy.o log.o moduleinfo.o loadermisc.o modules.o windows.o \
- lang.o kbd.o driverdisk.o selinux.o \
- mediacheck.o kickstart.o driverselect.o \
- getparts.o dirbrowser.o fwloader.o ibft.o \
- $(HWOBJS) $(METHOBJS)
-LOADEROBJS = loader.o loader-pcmcia.o
-NETOBJS = net.o urls.o ftp.o telnet.o telnetd.o
-SOURCES = $(subst .o,.c,$(OBJS)) loader.c
-
-LIBS +=
-
-CFLAGS += -DUSE_LOGDEV -DVERSION='"$(VERSION)"'
-REALCC=gcc
-
-# linuxrc + shutdown on s390, init everywhere else
-ifneq (,$(filter s390 s390x,$(ARCH)))
-BINS += linuxrc.s390 lsznet.raw shutdown
-SHUTDOWNOPTS = -DAS_SHUTDOWN=1
-else
-BINS += init
-endif
-
-# translation stuff
-LANGS = $(shell cut -f 2 ../lang-table | egrep -v '(^en$$)')
-
-TR = $(patsubst %,tr/%.tr,$(LANGS))
-TRFILES = $(patsubst %,%.tr,$(LANGS))
-
-all: $(BINS) loader.tr
-
-loader.tr: $(TR) ../lang-table
- (cd tr; ls $(TRFILES) | cpio --quiet -Hcrc -o |gzip -9) > $@
-
-tr/%.tr: ../po/%.po loader.po
- msgmerge -q $< loader.po | msgconv -t utf-8 | ./simplemot > $@
-
-loader.po: $(wildcard *.c)
- xgettext --default-domain=loader --add-comments \
- --keyword=_ --keyword=N_ *.c
- sed -i 's/charset=CHARSET/charset=UTF-8/' $@
-
-linuxrc.s390:
- @echo "Nothing to do for $@"
-
-lsznet.raw:
- @echo "Nothing to do for $@"
-
-init: init.o undomounts.o shutdown.o copy.o
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
-
-shutdown: shutdown.o undomounts.o
- $(CC) $(CFLAGS) $(SHUTDOWNOPTS) $(LDFLAGS) -o $@ $^
-
-init.o: init.c devices.h
- $(CC) $(CFLAGS) -c -o init.o init.c
-
-undomounts.o: undomounts.c
- $(CC) $(CFLAGS) -c -o undomounts.o undomounts.c
-
-shutdown.o: shutdown.c
- $(CC) $(CFLAGS) $(SHUTDOWNOPTS) -c -o shutdown.o shutdown.c
-
-mkctype: mkctype.c
- $(REALCC) $(CFLAGS) -o mkctype mkctype.c
-
-ctype.c: mkctype
- ./mkctype > ctype.c
-
-loader.o: loader.c
- $(CC) -DINCLUDE_LOCAL -DINCLUDE_NETWORK $(CFLAGS) -o $@ -c $<
-
-loader-local.o: loader.c
- $(CC) -DINCLUDE_LOCAL $(CFLAGS) -o $@ -c $<
-
-loader-net.o: loader.c
- $(CC) -DINCLUDE_NETWORK $(CFLAGS) -o $@ -c $<
-
-loader: loader.o $(OBJS) $(NETOBJS)
- $(CC) -g -o $@ $^ $(LIBS) $(LDFLAGS)
-
-clean:
- rm -f *.o *~ .depend init ctype.c mkctype loader
- rm -rf tr/*
-
-depend: $(CTYPEDEP)
- $(CPP) $(CFLAGS) -DHAVE_CONFIG_H -M $(SOURCES) > .depend
-
-install: all
- mkdir -p $(DESTDIR)/$(RUNTIMEDIR)/loader
- for n in $(BINS); do \
- install -m 755 $$n $(DESTDIR)/$(RUNTIMEDIR)/loader; \
- done
- if [ -f keymaps-$(ARCH) ]; then cp keymaps-$(ARCH) $(DESTDIR)/$(RUNTIMEDIR)/keymaps-override-$(ARCH) ; fi
- install -m 644 unicode-linedraw-chars.txt $(DESTDIR)/$(RUNTIMEDIR)/loader
- install -m 644 loader.tr $(DESTDIR)/$(RUNTIMEDIR)/loader
-
-dirbrowser: dirbrowser.c
- gcc -DSTANDALONE -D_FORTIFY_SOURCE=2 -Wall -Werror -ggdb -o dirbrowser dirbrowser.c -lnewt -lslang
-
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
diff --git a/loader/Makefile.am b/loader/Makefile.am
new file mode 100644
index 000000000..575c35d5a
--- /dev/null
+++ b/loader/Makefile.am
@@ -0,0 +1,92 @@
+# loader/Makefile.am for anaconda
+#
+# Copyright (C) 2009 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: David Cantrell <dcantrell@redhat.com>
+
+bootdir = $(libdir)/$(PACKAGE_NAME)-runtime/loader
+boot_PROGRAMS = loader
+boot_DATA = loader.tr
+dist_boot_DATA = unicode-linedraw-chars.txt
+noinst_PROGRAMS = mkctype dirbrowser
+noinst_DATA = ctype.c
+noinst_HEADERS = *.h
+
+if IS_S390
+boot_PROGRAMS += shutdown
+dist_boot_SCRIPTS = linuxrc.s390 lsznet.raw
+else
+boot_PROGRAMS += init
+endif
+
+if IS_KEYMAPS_OVERRIDE_ARCH
+keymapsdir = $(libdir)/$(PACKAGE_NAME)-runtime
+keymaps_DATA = keymaps-override-$(ARCH)
+endif
+
+COMMON_CFLAGS = -DUSE_LOGDEV -DVERSION='"$(PACKAGE_VERSION)"'
+
+loader_CFLAGS = $(COMMON_CFLAGS) $(LIBNM_GLIB_CFLAGS) \
+ -DINCLUDE_LOCAL -DINCLUDE_NETWORK
+loader_LDADD = $(NEWT_LIBS) $(POPT_LIBS) $(LIBNL_LIBS) \
+ $(LIBNM_GLIB_LIBS) $(CHECKISOMD5_LIBS) \
+ $(ISCSI_LIBS) $(top_srcdir)/isys/libisys.la
+loader_SOURCES = loader.c copy.c log.c moduleinfo.c loadermisc.c \
+ modules.c windows.c lang.c kbd.c driverdisk.c \
+ selinux.c mediacheck.c kickstart.c driverselect.c \
+ getparts.c dirbrowser.c fwloader.c ibft.c hardware.c \
+ method.c cdinstall.c hdinstall.c nfsinstall.c \
+ urlinstall.c net.c urls.c ftp.c telnet.c telnetd.c
+
+init_CFLAGS = $(COMMON_CFLAGS)
+init_SOURCES = init.c undomounts.c shutdown.c copy.c
+
+shutdown_CFLAGS = $(COMMON_CFLAGS) -DAS_SHUTDOWN=1
+shutdown_SOURCES = shutdown.c undomounts.c
+
+mkctype_CFLAGS = $(COMMON_CFLAGS)
+mkctype_SOURCES = mkctype.c
+
+dirbrowser_CFLAGS = $(COMMON_CFLAGS) -DSTANDALONE
+dirbrowser_LDADD = $(NEWT_LIBS)
+dirbrowser_SOURCES = dirbrowser.c
+
+EXTRA_DIST = simplemot keymaps-*
+
+CLEANFILES = keymaps-override-$(ARCH) ctype.c tr/*.tr
+
+MAINTAINERCLEANFILES = Makefile.in
+
+keymaps-override-$(ARCH): keymaps-$(ARCH)
+ cp -p $< $@
+
+ctype.c: mkctype
+ ./mkctype > ctype.c
+
+loader.tr: $(top_srcdir)/lang-table loader.po
+ @LANGS="`cut -f 2 $(top_srcdir)/lang-table | egrep -v '(^en$$)'`" ; \
+ if [ ! -d tr ]; then \
+ mkdir -p tr ; \
+ fi ; \
+ for lang in $$LANGS ; do \
+ msgmerge -q $(top_srcdir)/po/$$lang.po loader.po | msgconv -t utf-8 | ./simplemot > tr/$$lang.tr ; \
+ done ; \
+ (cd tr ; ls -1 *.tr | cpio --quiet -Hcrc -o | gzip -9) > $@
+
+loader.po:
+ xgettext --default-domain=loader --add-comments \
+ --keyword=_ --keyword=N_ *.c
+ sed -i 's/charset=CHARSET/charset=UTF-8/' $@