summaryrefslogtreecommitdiff
path: root/package/yaboot/patches/patch-Makefile
blob: 08d117b6e177b6a434a34fd6162688b3fb8fb54c (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- yaboot-1.3.17.orig/Makefile	2011-10-18 06:11:10.000000000 +0200
+++ yaboot-1.3.17/Makefile	2018-06-08 23:26:05.000000000 +0200
@@ -7,7 +7,7 @@ VERSION = 1.3.17
 DEBUG = 0
 # make install vars
 ROOT =
-PREFIX = usr/local
+PREFIX = usr
 MANDIR = man
 # command used to get root (needed for tarball creation)
 GETROOT = fakeroot
@@ -25,7 +25,7 @@ KERNELADDR	= 0x00000000
 # Set this to the prefix of your cross-compiler, if you have one.
 # Else leave it empty.
 #
-CROSS =
+CROSS ?=
 
 CC		:= $(CROSS)gcc
 LD		:= $(CROSS)ld
@@ -39,7 +39,7 @@ YBCFLAGS += -DVERSION="\"${VERSION}${VER
 YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
 YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
 YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
-YBCFLAGS += -Werror -fdiagnostics-show-option
+YBCFLAGS += -fdiagnostics-show-option
 YBCFLAGS += -I ./include
 YBCFLAGS += -fno-strict-aliasing
 
@@ -59,22 +59,18 @@ ifeq ($(CONFIG_FS_XFS),y)
 YBCFLAGS += -DCONFIG_FS_XFS
 endif
 
-ifeq ($(CONFIG_FS_REISERFS),y)
-YBCFLAGS += -DCONFIG_FS_REISERFS
-endif
-
 # Link flags
 #
-LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
+LFLAGS = -static -Ttext $(TEXTADDR) -melf32ppclinux
 
 # Libraries
 #
-LLIBS = -lext2fs
+#LLIBS = -lext2fs -static
 
 # For compiling userland utils
 #
 UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include
-UCFLAGS += -Werror -fdiagnostics-show-option
+UCFLAGS += -fdiagnostics-show-option
 
 # For compiling build-tools that run on the host.
 #
@@ -85,7 +81,7 @@ HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/
 
 OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \
 	second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
-	second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o \
+	second/fs_of.o second/fs_iso.o second/fs_swap.o \
 	second/iso_util.o \
 	lib/nonstd.o \
 	lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
@@ -98,14 +94,10 @@ ifeq ($(CONFIG_FS_XFS),y)
 OBJS += second/fs_xfs.o
 endif
 
-ifeq ($(CONFIG_FS_REISERFS),y)
-OBJS += second/fs_reiserfs.o
-endif
-
 # compilation
 lgcc = `$(CC) -m32 -print-libgcc-file-name`
 
-all: yaboot addnote mkofboot
+all: yaboot
 
 yaboot: $(OBJS)
 	$(LD) $(LFLAGS) $(OBJS) $(LLIBS) $(lgcc) -o second/$@
@@ -181,13 +173,11 @@ strip: all
 	strip util/addnote
 	strip --remove-section=.comment --remove-section=.note util/addnote
 
-install: all strip
+install: all
 	install -d -o root -g root -m 0755 ${ROOT}/etc/
 	install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/
 	install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib
 	install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
-	install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
-	install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/
 	install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
 	install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
 	install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot