]> Joshua Wise's Git repositories - netwatch.git/blob - netwatch/Makefile
Add cross-compile support (for fools like me who build on OS X) to the Makefiles.
[netwatch.git] / netwatch / Makefile
1 -include ../config.mk
2
3 CC=$(CROSS)gcc
4 CFLAGS=-I../include -I../include/raw \
5        -I../lwip/src/include -I../lwip/src/include/ipv4 \
6        -nostdlib -nostdinc -fno-builtin -D__RAW__ \
7        -Wall -Werror -std=gnu99 -Wstrict-aliasing=2 \
8        -O1 -fno-merge-constants -fno-strict-aliasing
9
10 STUBOBJS=entry.o pagingstub-asm.o pagingstub.o
11
12 LWIP_OBJS = \
13         ../lwip/src/core/dhcp.o \
14         ../lwip/src/core/dns.o \
15         ../lwip/src/core/init.o \
16         ../lwip/src/core/ipv4/autoip.o \
17         ../lwip/src/core/ipv4/icmp.o \
18         ../lwip/src/core/ipv4/igmp.o \
19         ../lwip/src/core/ipv4/inet.o \
20         ../lwip/src/core/ipv4/inet_chksum.o \
21         ../lwip/src/core/ipv4/ip.o \
22         ../lwip/src/core/ipv4/ip_addr.o \
23         ../lwip/src/core/ipv4/ip_frag.o \
24         ../lwip/src/core/mem.o \
25         ../lwip/src/core/memp.o \
26         ../lwip/src/core/netif.o \
27         ../lwip/src/core/pbuf.o \
28         ../lwip/src/core/raw.o \
29         ../lwip/src/core/stats.o \
30         ../lwip/src/core/sys.o \
31         ../lwip/src/core/tcp.o \
32         ../lwip/src/core/tcp_in.o \
33         ../lwip/src/core/tcp_out.o \
34         ../lwip/src/core/udp.o \
35         ../lwip/src/netif/etharp.o \
36         ../lwip/src/netif/ethernetif.o
37
38
39 OBJS =  ../ich2/smi.o \
40         ../ich2/smram-ich2.o \
41         ../ich2/ich2-timer.o \
42         ../pci/pci.o \
43         ../pci/pci-raw.o \
44         ../pci/pci-bother.o \
45         ../net/net.o \
46         ../net/http/fs.o \
47         ../net/http/httpd.o \
48         ../net/3c90x.o \
49         ../net/rfb.o \
50         ../video/tnt2.o \
51         ../video/fb.o \
52         ../video/generic.o \
53         ../video/text.o \
54         drivers.o \
55         ../lib/minilib.o \
56         ../lib/doprnt.o \
57         ../lib/sprintf.o \
58         ../lib/console.o \
59         ../lib/serial.o \
60         ../lib/crc32.o \
61         ../lib/demap.o \
62         ../lib/state.o \
63         ../lib/cpuid.o \
64         keyboard.o \
65         packet.o \
66         $(LWIP_OBJS) \
67         smi.o \
68         vga-overlay.o \
69         main.o \
70         traps.o \
71         firstrun.o
72
73
74 all: aseg.elf
75
76 aseg.elf: netwatch-large.lds $(STUBOBJS) $(OBJS)
77         $(CROSS)ld -o aseg.elf -T netwatch-large.lds $(STUBOBJS) $(OBJS)
78
79 clean:
80         rm -f $(OBJS) aseg.elf entry.bin entry.o
81
82 %.o: %.asm
83         nasm -o $@.bin $<
84         $(CROSS)objcopy -I binary -B i386 -O elf32-i386 $@.bin $@
85         rm -f $@.bin
This page took 0.033452 seconds and 4 git commands to generate.