Преглед на файлове

[makefile] Split platform-dependent portions out of arch/i386/Makefile

tags/v0.9.6
Michael Brown преди 16 години
родител
ревизия
5c695db474
променени са 2 файла, в които са добавени 56 реда и са изтрити 50 реда
  1. 7
    50
      src/arch/i386/Makefile
  2. 49
    0
      src/arch/i386/Makefile.pcbios

+ 7
- 50
src/arch/i386/Makefile Целия файл

@@ -35,10 +35,6 @@ CFLAGS		+= -mrtd
35 35
 #
36 36
 CFLAGS		+= -freg-struct-return
37 37
 
38
-# Stop ld from complaining about our customised linker script
39
-#
40
-LDFLAGS		+= -N --no-check-sections
41
-
42 38
 # Force 32-bit code even on an x86-64 machine
43 39
 #
44 40
 CFLAGS		+= -m32
@@ -78,68 +74,29 @@ NON_AUTO_SRCS	+= arch/i386/core/wince_loader.c
78 74
 
79 75
 # unnrv2b.S is used to generate a 16-bit as well as a 32-bit object.
80 76
 #
81
-OBJS_unnrv2b		= unnrv2b unnrv2b16
82
-CFLAGS_unnrv2b16	= -DCODE16
77
+OBJS_unnrv2b	= unnrv2b unnrv2b16
78
+CFLAGS_unnrv2b16 = -DCODE16
83 79
 
84
-# The i386 linker script
80
+# Include platform-specific Makefile
85 81
 #
86
-LDSCRIPT		= arch/i386/scripts/i386.lds
87
-
88
-# Media types.
89
-# 
90
-MEDIA			+= rom
91
-MEDIA			+= pxe
92
-MEDIA			+= kpxe
93
-MEDIA			+= elf
94
-MEDIA			+= elfd
95
-MEDIA			+= lmelf
96
-MEDIA			+= lmelfd
97
-MEDIA			+= lkrn
98
-MEDIA			+= bImage
99
-MEDIA			+= dsk
100
-MEDIA			+= nbi
101
-MEDIA			+= hd
102
-MEDIA			+= raw
103
-MEDIA			+= com
104
-MEDIA			+= exe
105
-
106
-# Special target for building Master Boot Record binary
107
-$(BIN)/mbr.bin : $(BIN)/mbr.o
108
-	$(OBJCOPY) -O binary $< $@
82
+MAKEDEPS	+= arch/i386/Makefile.$(PLATFORM)
83
+include arch/i386/Makefile.$(PLATFORM)
109 84
 
110 85
 # Some suffixes (e.g. %.fd0) are generated directly from other
111 86
 # finished files (e.g. %.dsk), rather than having their own prefix.
112 87
 
113 88
 # rule to write disk images to /dev/fd0
114
-NON_AUTO_MEDIA		+= fd0
89
+NON_AUTO_MEDIA	+= fd0
115 90
 %fd0 : %dsk
116 91
 	dd if=$< bs=512 conv=sync of=/dev/fd0
117 92
 	sync
118 93
 
119 94
 # rule to create padded disk images
120
-NON_AUTO_MEDIA		+= pdsk
95
+NON_AUTO_MEDIA	+= pdsk
121 96
 %pdsk : %dsk
122 97
 	cp $< $@
123 98
 	$(PERL) ./util/dskpad.pl $@
124 99
 
125
-# rule to make a non-emulation ISO boot image
126
-NON_AUTO_MEDIA		+= iso
127
-%iso:	%lkrn util/geniso
128
-	ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
129
-
130
-# rule to make a floppy emulation ISO boot image
131
-NON_AUTO_MEDIA		+= liso
132
-%liso:	%lkrn util/genliso
133
-	bash util/genliso $@ $<
134
-
135
-# rule to make a USB disk image
136
-$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
137
-	$(OBJCOPY) -O binary $< $@
138
-
139
-NON_AUTO_MEDIA		+= usb
140
-%usb: $(BIN)/usbdisk.bin %hd
141
-	cat $^ > $@
142
-
143 100
 # Add NON_AUTO_MEDIA to the media list, so that they show up in the
144 101
 # output of "make"
145 102
 #

+ 49
- 0
src/arch/i386/Makefile.pcbios Целия файл

@@ -0,0 +1,49 @@
1
+# -*- makefile -*- : Force emacs to use Makefile mode
2
+
3
+# The i386 linker script
4
+#
5
+LDSCRIPT	= arch/i386/scripts/i386.lds
6
+
7
+# Stop ld from complaining about our customised linker script
8
+#
9
+LDFLAGS		+= -N --no-check-sections
10
+
11
+# Media types.
12
+#
13
+MEDIA		+= rom
14
+MEDIA		+= pxe
15
+MEDIA		+= kpxe
16
+MEDIA		+= elf
17
+MEDIA		+= elfd
18
+MEDIA		+= lmelf
19
+MEDIA		+= lmelfd
20
+MEDIA		+= lkrn
21
+MEDIA		+= bImage
22
+MEDIA		+= dsk
23
+MEDIA		+= nbi
24
+MEDIA		+= hd
25
+MEDIA		+= raw
26
+MEDIA		+= com
27
+MEDIA		+= exe
28
+
29
+# rule to make a non-emulation ISO boot image
30
+NON_AUTO_MEDIA	+= iso
31
+%iso:	%lkrn util/geniso
32
+	ISOLINUX_BIN=$(ISOLINUX_BIN) bash util/geniso $@ $<
33
+
34
+# rule to make a floppy emulation ISO boot image
35
+NON_AUTO_MEDIA	+= liso
36
+%liso:	%lkrn util/genliso
37
+	bash util/genliso $@ $<
38
+
39
+# Special target for building Master Boot Record binary
40
+$(BIN)/mbr.bin : $(BIN)/mbr.o
41
+	$(OBJCOPY) -O binary $< $@
42
+
43
+# rule to make a USB disk image
44
+$(BIN)/usbdisk.bin : $(BIN)/usbdisk.o
45
+	$(OBJCOPY) -O binary $< $@
46
+
47
+NON_AUTO_MEDIA	+= usb
48
+%usb: $(BIN)/usbdisk.bin %hd
49
+	cat $^ > $@

Loading…
Отказ
Запис