xref: /titanic_52/usr/src/grub/grub-0.97/netboot/Makefile.am (revision 00a3eaf3896a33935e11fd5c5fb5c1714225c067)
1# For <shared.h> and <stage1.h>.
2INCLUDES = -I$(top_srcdir)/stage2 -I$(top_srcdir)/stage1
3
4# Don't build the netboot support by default.
5if NETBOOT_SUPPORT
6LIBDRIVERS = libdrivers.a
7else
8LIBDRIVERS =
9endif
10
11noinst_LIBRARIES = $(LIBDRIVERS)
12
13libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \
14	dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \
15	i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \
16	if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \
17	little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \
18	pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \
19	types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h
20EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \
21	e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \
22	ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \
23	sundance.c tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \
24	w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c \
25	undi.c undi.h
26libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
27	-DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS)
28# Filled by configure.
29libdrivers_a_LIBADD = @NETBOOT_DRIVERS@
30libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD)
31
32EXTRA_DIST = README.netboot
33
34# These below are several special rules for the device drivers.
35# We cannot use a simple rule for them...
36
37# What objects are derived from a driver?
38#3c509_drivers = 3c509.o 3c529.o
393c595_drivers = 3c595.o
403c90x_drivers = 3c90x.o
41#cs89x0_drivers = cs89x0.o
42davicom_drivers = davicom.o
43#depca_drivers = depca.o
44#eepro_drivers = eepro.o
45e1000_drivers = e1000.o
46eepro100_drivers = eepro100.o
47epic100_drivers = epic100.o
48#fa311_drivers = fa311.o
49forcedeth_drivers = forcedeth.o
50#i82586_drivers = 3c507.o exos205.o ni5210.o
51#lance_drivers = lance.o ne2100.o ni6510.o
52natsemi_drivers = natsemi.o
53#ni5010_drivers = ni5010.o
54ns83820_drivers = ns83820.o
55ns8390_drivers = 3c503.o ne.o ns8390.o wd.o
56#otulip_drivers = otulip.o
57pcnet32_drivers = pcnet32.o
58pnic_drivers = pnic.o
59r8169_drivers = r8169.o
60rtl8139_drivers = rtl8139.o
61sis900_drivers = sis900.o
62#sk_g16_drivers = sk_g16.o
63sundance_drivers = sundance.o
64#smc9000_drivers = smc9000.o
65tg3_drivers = tg3.o
66#tiara_drivers = tiara.o
67tlan_drivers = tlan.o
68tulip_drivers = tulip.o
69undi_drivers = undi.o
70via_rhine_drivers = via_rhine.o
71w89c840_drivers = w89c840.o
72
73
74# Is it really necessary to specify dependecies explicitly?
75#$(3c509_drivers): 3c509.c 3c509.h
76#$(3c509_drivers): %.o: 3c509.c
77#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
78#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
79
80$(3c595_drivers): 3c595.c 3c595.h
81$(3c595_drivers): %.o: 3c595.c
82	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
83	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
84
85$(3c90x_drivers): 3c90x.c
86$(3c90x_drivers): %.o: 3c90x.c
87	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
88	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
89
90#$(cs89x0_drivers): cs89x0.c cs89x0.h
91#$(cs89x0_drivers): %.o: cs89x0.c
92#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
93#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
94
95$(davicom_drivers): davicom.c
96$(davicom_drivers): %.o: davicom.c
97	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
98	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
99
100#$(depca_drivers): depca.c
101#$(depca_drivers): %.o: depca.c
102#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
103#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
104
105#$(eepro_drivers): eepro.c
106#$(eepro_drivers): %.o: eepro.c
107#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
108#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
109
110$(e1000_drivers): e1000.c e1000_hw.h
111$(e1000_drivers): %.o: e1000.c
112	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
113	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
114
115$(eepro100_drivers): eepro100.c
116$(eepro100_drivers): %.o: eepro100.c
117	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
118	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
119
120$(epic100_drivers): epic100.c epic100.h
121$(epic100_drivers): %.o: epic100.c
122	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
123	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
124
125$(forcedeth_drivers): forcedeth.c
126$(forcedeth_drivers): %.o: forcedeth.c
127	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
128	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
129
130#$(fa311_drivers): fa311.c
131#$(fa311_drivers): %.o: fa311.c
132#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
133#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
134
135#$(i82586_drivers): i82586.c
136#$(i82586_drivers): %.o: i82586.c
137#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
138#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
139
140#$(lance_drivers): lance.c
141#$(lance_drivers): %.o: lance.c
142#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
143#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
144
145$(natsemi_drivers): natsemi.c
146$(natsemi_drivers): %.o: natsemi.c
147	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
148	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
149
150#$(ni5010_drivers): ni5010.c
151#$(ni5010_drivers): %.o: ni5010.c
152#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
153#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
154
155$(ns83820_drivers): ns83820.c
156$(ns83820_drivers): %.o: ns83820.c
157	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
158	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
159
160$(ns8390_drivers): ns8390.c ns8390.h
161$(ns8390_drivers): %.o: ns8390.c
162	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
163	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
164
165#$(otulip_drivers): otulip.c otulip.h
166#$(otulip_drivers): %.o: otulip.c
167#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
168#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
169
170$(pcnet32_drivers): pcnet32.c
171$(pcnet32_drivers): %.o: pcnet32.c
172	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
173	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
174
175$(pnic_drivers): pnic.c
176$(pnic_drivers): %.o: pnic.c pnic_api.h
177	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
178	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
179
180$(rtl8139_drivers): rtl8139.c
181$(rtl8139_drivers): %.o: rtl8139.c
182	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
183	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
184
185$(r8169_drivers): r8169.c
186$(r8169_drivers): %.o: r8169.c
187	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
188	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
189
190$(sis900_drivers): sis900.c sis900.h
191$(sis900_drivers): %.o: sis900.c
192	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
193	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
194
195#$(sk_g16_drivers): sk_g16.c sk_g16.h
196#$(sk_g16_drivers): %.o: sk_g16.c
197#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
198#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
199
200#$(smc9000_drivers): smc9000.c smc9000.h
201#$(smc9000_drivers): %.o: smc9000.c
202#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
203#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
204
205$(sundance_drivers): sundance.c
206$(sundance_drivers): %.o: sundance.c
207	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
208	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
209
210$(tg3_drivers): tg3.c tg3.h
211$(tg3_drivers): %.o: tg3.c
212	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
213	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
214
215#$(tiara_drivers): tiara.c
216#$(tiara_drivers): %.o: tiara.c
217#	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
218#	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
219
220$(tlan_drivers): tlan.c tlan.h
221$(tlan_drivers): %.o: tlan.c
222	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
223	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
224
225$(tulip_drivers): tulip.c
226$(tulip_drivers): %.o: tulip.c
227	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
228	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
229
230$(undi_drivers): undi.c undi.h
231$(undi_drivers): %.o: undi.c
232	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
233          $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
234
235$(via_rhine_drivers): via-rhine.c
236$(via_rhine_drivers): %.o: via-rhine.c
237	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
238	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
239
240$(w89c840_drivers): w89c840.c
241$(w89c840_drivers): %.o: w89c840.c
242	$(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
243	  $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $<
244
245# Per-object flags.
246#3c509_o_CFLAGS = -DINCLUDE_3C509=1
247#3c529_o_CFLAGS = -DINCLUDE_3C529=1
2483c595_o_CFLAGS = -DINCLUDE_3C595=1
2493c90x_o_CFLAGS = -DINCLUDE_3C90X=1
250#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1
251davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1
252#depca_o_CFLAGS = -DINCLUDE_DEPCA=1
253#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1
254e1000_o_CFLAGS = -DINCLUDE_E1000=1
255eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1
256epic100_o_CFLAGS = -DINCLUDE_EPIC100=1
257#fa311_o_CFLAGS = -DINCLUDE_FA311=1
258forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1
259#3c507_o_CFLAGS = -DINCLUDE_3C507=1
260#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1
261#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1
262#lance_o_CFLAGS = -DINCLUDE_LANCE=1
263#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1
264#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1
265natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1
266#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1
267#3c503_o_CFLAGS = -DINCLUDE_3C503=1
268#ne_o_CFLAGS = -DINCLUDE_NE=1
269ns83820_o_CFLAGS = -DINCLUDE_NS83820=1
270ns8390_o_CFLAGS = -DINCLUDE_NS8390=1
271#wd_o_CFLAGS = -DINCLUDE_WD=1
272#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1
273pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1
274pnic_o_CFLAGS = -DINCLUDE_PNIC=1
275r8169_o_CFLAGS = -DINCLUDE_R8169=1
276rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1
277sis900_o_CFLAGS = -DINCLUDE_SIS900=1
278#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1
279#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1
280sundance_o_CFLAGS = -DINCLUDE_SUNDANCE=1
281#tiara_o_CFLAGS = -DINCLUDE_TIARA=1
282tg3_o_CFLAGS = -DINCLUDE_TG3=1
283tlan_o_CFLAGS = -DINCLUDE_TLAN=1
284tulip_o_CFLAGS = -DINCLUDE_TULIP=1
285undi_o_CFLAGS = -DINCLUDE_UNDI=1
286via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1
287w89c840_o_CFLAGS = -DINCLUDE_W89C840=1
288