summaryrefslogtreecommitdiffstats
path: root/isys
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-06-09 11:22:10 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-06-09 12:26:52 -1000
commitc8f339eb1771b37ab3b522f4073e9943d2207b5a (patch)
treebb61c984df4b1103b7750fed701d0240c3224edd /isys
parentabc43d966699e5d3afe387abe7a6d23e0ec15f35 (diff)
downloadanaconda-c8f339eb1771b37ab3b522f4073e9943d2207b5a.tar.gz
anaconda-c8f339eb1771b37ab3b522f4073e9943d2207b5a.tar.xz
anaconda-c8f339eb1771b37ab3b522f4073e9943d2207b5a.zip
Convert isys/ to Makefile.am
Diffstat (limited to 'isys')
-rw-r--r--isys/Makefile90
-rw-r--r--isys/Makefile.am53
2 files changed, 53 insertions, 90 deletions
diff --git a/isys/Makefile b/isys/Makefile
deleted file mode 100644
index 57d9df53d..000000000
--- a/isys/Makefile
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# Makefile
-#
-# Copyright (C) 2007, 2008 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
-
-CFLAGS += -I$(PYTHONINCLUDE) -I.. -DHAVE_NFS
-
-OBJECTS = devices.o imount.o smp.o cpio.o uncpio.o dasd.o \
- lang.o isofs.o linkdetect.o vio.o \
- ethtool.o eddsupport.o iface.o str.o auditd.o
-SOBJECTS = $(patsubst %.o,%.lo,$(OBJECTS))
-SOURCES = $(patsubst %.o,%.c,$(OBJECTS)) isys.c
-LOADLIBES = -lresolv -lpopt -lext2fs -lz -ldevmapper -lblkid -lX11
-LOADLIBES += $(SELINUXLIBES)
-ifeq ($(USESELINUX),1)
-LOADLIBES += -laudit
-endif
-PYMODULES = _isys.so
-SUBDIRS =
-
-# NetworkManager
-LOADLIBES += $(shell pkg-config --libs NetworkManager)
-CFLAGS += $(shell pkg-config --cflags NetworkManager)
-
-# libnl
-LOADLIBES += $(shell pkg-config --libs libnl-1)
-CFLAGS += $(shell pkg-config --cflags libnl-1)
-
-# libnm-glib
-LOADLIBES += $(shell pkg-config --libs libnm_glib)
-CFLAGS += $(shell pkg-config --cflags libnm_glib)
-
-ifeq ($(ARCH),ppc)
-OBJECTS += minifind.o
-SOURCES += minifind.c
-endif
-
-ifeq (.depend,$(wildcard .depend))
-TARGET=all
-else
-TARGET=depend all
-endif
-
-everything: $(TARGET)
-
-all: subdirs $(PYMODULES) libisys.a
-
-%.lo: %.c
- $(CC) -c $(CFLAGS) -fPIC -o $@ $<
-
-_isys.so: isys.lo $(SOBJECTS)
- gcc -shared -g -fPIC -o $@ isys.lo $(SOBJECTS) $(LOADLIBES) $(LDFLAGS)
-
-libisys.a: libisys.a($(OBJECTS))
-
-clean:
- rm -f *.o *.so *.lo *.a *.pyc $(TARGET) $(SOBJECTS)
- rm -f $(OBJECTS)
- rm -f .depend
- for d in $(SUBDIRS); do make -C $$d clean; done
-
-install: all
- install -s $(PYMODULES) $(DESTDIR)/$(PYTHONLIBDIR)
- install -p -m 644 isys.py $(DESTDIR)/$(PYTHONLIBDIR)
-
-subdirs:
- for d in $(SUBDIRS); do make -C $$d; done
-
-depend:
- $(CPP) -M $(CFLAGS) $(SOURCES) > .depend
-
-ifeq (.depend,$(wildcard .depend))
-include .depend
-endif
diff --git a/isys/Makefile.am b/isys/Makefile.am
new file mode 100644
index 000000000..7ca898ae1
--- /dev/null
+++ b/isys/Makefile.am
@@ -0,0 +1,53 @@
+# isys/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>
+
+ISYS_SRCS = devices.c imount.c smp.c cpio.c uncpio.c dasd.c lang.c \
+ isofs.c linkdetect.c vio.c ethtool.c eddsupport.c iface.c \
+ str.c auditd.c
+
+if IS_PPC
+ISYS_SRCS += minifind.c
+endif
+
+dist_noinst_HEADERS = *.h
+
+ISYS_CFLAGS = $(NFS_CFLAGS) $(NETWORKMANAGER_CFLAGS) $(LIBNL_CFLAGS) \
+ $(LIBNM_GLIB_CFLAGS)
+ISYS_LIBS = $(RESOLV_LIBS) $(POPT_LIBS) $(EXT2FS_LIBS) $(ZLIB_LIBS) \
+ $(DEVMAPPER_LIBS) $(BLKID_LIBS) $(X11_LIBS) $(SELINUX_LIBS)
+
+isysdir = $(libdir)/$(PACKAGE_NAME)
+isys_PYTHON = *.py
+
+pkgpyexecdir = $(libdir)/$(PACKAGE_NAME)
+pkgpythondir = $(libdir)/$(PACKAGE_NAME)
+
+pkgpyexec_LTLIBRARIES = _isys.la
+_isys_la_CFLAGS = $(PYTHON_INCLUDES) $(ISYS_CFLAGS)
+_isys_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS)
+_isys_la_LIBADD = $(PYTHON_LIBS) $(ISYS_LIBS)
+_isys_la_SOURCES = isys.c $(ISYS_SRCS)
+
+noinst_LTLIBRARIES = libisys.la
+libisys_la_CFLAGS = $(ISYS_CFLAGS)
+libisys_la_LDFLAGS = -static
+libisys_la_LIBADD = $(ISYS_LIBS)
+libisys_la_SOURCES = $(ISYS_SRCS)
+
+MAINTAINERCLEANFILES = Makefile.in