summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-12-03 21:17:27 +0000
committerJeremy Katz <katzj@redhat.com>2002-12-03 21:17:27 +0000
commit8c69e545392c9a5389dc9411df7848e175a4ca97 (patch)
treed7cb1e4668f464093f1c0dbc022c981ab3a9f08f
parent23fbd51a6871420afd6143750f2f65a39231b503 (diff)
downloadanaconda-8c69e545392c9a5389dc9411df7848e175a4ca97.tar.gz
anaconda-8c69e545392c9a5389dc9411df7848e175a4ca97.tar.xz
anaconda-8c69e545392c9a5389dc9411df7848e175a4ca97.zip
make things build with loader/isys movement of stuff
-rw-r--r--utils/Makefile29
-rw-r--r--utils/mapshdr.c2
-rw-r--r--utils/moddeps.c6
-rw-r--r--utils/modlist.c9
-rw-r--r--utils/readmap.c2
5 files changed, 28 insertions, 20 deletions
diff --git a/utils/Makefile b/utils/Makefile
index d11b374a9..56e7378be 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -5,10 +5,11 @@ ARCH := $(patsubst sparc%,sparc,$(ARCH))
ISYSLIB=isys
-LOADLIBES = -L../isys -l$(ISYSLIB) -lpopt
-CFLAGS = -Wall -g -I.. -I/usr/include/rpm-4.0.4 -I../loader
+LOADERDIR = ../loader2
+LOADLIBES = -lpopt
+CFLAGS = -Wall -g -I.. -I$(LOADERDIR)
+RPMCFLAGS = $(CFLAGS) -I/usr/include/rpm
LDFLAGS = -g -static
-MODDEPS = moddeps
ifeq (.depend,$(wildcard .depend))
TARGET=all
@@ -18,12 +19,17 @@ endif
everything: $(TARGET)
-all: modlist $(MODDEPS) snarffont mapshdr readmap
+all: modlist moddeps snarffont mapshdr readmap
-modlist: modlist.o
+modlist: modlist.o moduleinfo.o
+ $(CC) $(LDFLAGS) -o modlist modlist.o moduleinfo.o $(LOADLIBES)
-moduledeps.o: ../loader/moduledeps.c
- cp ../loader/moduledeps.c ./
+moduleinfo.o: $(LOADERDIR)/moduleinfo.c
+ cp $(LOADERDIR)/moduleinfo.c ./
+ $(CC) $(CFLAGS) -c moduleinfo.c
+
+moduledeps.o: $(LOADERDIR)/moduledeps.c
+ cp $(LOADERDIR)/moduledeps.c ./
$(CC) $(CFLAGS) -c moduledeps.c
moddeps: moddeps.o moduledeps.o
@@ -36,8 +42,8 @@ md5.o: md5.c md5.h
gcc -c -O -g md5.c
genhdlist: genhdlist.c hash.c
- $(CC) $(LDFLAGS) $(CFLAGS) -o genhdlist genhdlist.c hash.c -lrpm-4.0.4 -lrpmdb-4.0.4 -lrpmio-4.0.4 \
- -lbz2 -lz -lpopt
+ $(CC) $(LDFLAGS) $(RPMCFLAGS) -o genhdlist genhdlist.c hash.c \
+ -lrpm -lrpmdb -lrpmio -lbz2 -lz -lpopt -lelf
depends:
@@ -54,10 +60,11 @@ install: all
install -m755 mapshdr $(DESTDIR)/$(RUNTIMEDIR)
clean:
- rm -f modlist moddeps snarffont genhdlist mapshdr readmap *.o
+ rm -f modlist moddeps snarffont genhdlist mapshdr readmap \
+ moduledeps.c moduleinfo.c *.o
depend:
- $(CPP) -M $(CFLAGS) *.c > .depend
+ $(CPP) -M $(RPMCFLAGS) *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
diff --git a/utils/mapshdr.c b/utils/mapshdr.c
index f37eacc31..4c8cb002d 100644
--- a/utils/mapshdr.c
+++ b/utils/mapshdr.c
@@ -5,7 +5,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../loader/lang.h"
+#include "../isys/lang.h"
int main(int argc, char ** argv) {
struct kmapHeader h;
diff --git a/utils/moddeps.c b/utils/moddeps.c
index a6239df35..7905d93e6 100644
--- a/utils/moddeps.c
+++ b/utils/moddeps.c
@@ -5,7 +5,7 @@
#include <sys/utsname.h>
#include "../isys/isys.h"
-#include "../loader/modules.h"
+#include "modules.h"
void setFloppyDevice(int flags) {
}
@@ -53,7 +53,7 @@ int main(int argc, char ** argv) {
{ 0, 0, 0, 0, 0 }
};
- optCon = poptGetContext(NULL, argc, argv, optionTable, 0);
+ optCon = poptGetContext(NULL, argc, (const char **) argv, optionTable, 0);
if ((rc = poptGetNextOpt(optCon)) < -1) {
fprintf(stderr, "bad option %s: %s\n",
@@ -75,7 +75,7 @@ int main(int argc, char ** argv) {
exit(1);
}
- while ((mod = poptGetArg(optCon))) {
+ while ((mod = (char *) poptGetArg(optCon))) {
list = mlGetDeps(ml, mod);
if (list) {
for (l = list; *l; l++)
diff --git a/utils/modlist.c b/utils/modlist.c
index bb7e5a2fc..14f15e7cb 100644
--- a/utils/modlist.c
+++ b/utils/modlist.c
@@ -4,6 +4,7 @@
#include <string.h>
#include "../isys/isys.h"
+#include "moduleinfo.h"
int main(int argc, char ** argv) {
poptContext optCon;
@@ -37,8 +38,8 @@ int main(int argc, char ** argv) {
exit(1);
}
- mis = isysNewModuleInfoSet();
- if (isysReadModuleInfo(modInfoFile, mis, NULL)) {
+ mis = newModuleInfoSet();
+ if (readModuleInfo(modInfoFile, mis, NULL, 0)) {
fprintf(stderr, "Failed to read %s\n", modInfoFile);
exit(1);
}
@@ -46,7 +47,7 @@ int main(int argc, char ** argv) {
if (showModInfo) {
printf("Version 0\n");
while ((mod = poptGetArg(optCon))) {
- mi = isysFindModuleInfo(mis, mod);
+ mi = findModuleInfo(mis, mod);
if (mi) {
printf("%s\n", mi->moduleName);
switch (mi->major) {
@@ -97,7 +98,7 @@ int main(int argc, char ** argv) {
exit(1);
}
- list = isysGetModuleList(mis, major);
+ list = getModuleList(mis, major);
for (m = list; m && m->moduleName; m++)
printf("%s\n", m->moduleName);
free(list);
diff --git a/utils/readmap.c b/utils/readmap.c
index 065173f66..5e42493ab 100644
--- a/utils/readmap.c
+++ b/utils/readmap.c
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "../loader/lang.h"
+#include "../isys/lang.h"
int main(int argc, char ** argv) {
int console;