source: trunk/packages/xen-3.1/xen-3.1/tools/firmware/vgabios/Makefile @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 3.5 KB
Line 
1CC      = gcc
2
3GCC = gcc
4BCC = bcc
5AS86 = as86
6
7RELEASE = `pwd | sed "s-.*/--"`
8RELDATE = `date '+%d %b %Y'`
9RELVERS = `pwd | sed "s-.*/--" | sed "s/vgabios//" | sed "s/-//"`
10
11VGABIOS_DATE = "-DVGABIOS_DATE=\"$(RELDATE)\""
12
13.PHONY: all
14all: bios cirrus-bios
15
16.PHONY: bios
17bios: biossums vgabios.bin vgabios.debug.bin
18
19.PHONY: cirrus-bios
20cirrus-bios: vgabios-cirrus.bin vgabios-cirrus.debug.bin
21
22.PHONY: clean
23clean:
24        rm -f biossums *.o *.s *.ld86 \
25          temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
26        rm -f VGABIOS-lgpl-latest*.bin
27
28.PHONY: release
29release: 
30        VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
31        /bin/rm -f  *.o *.s *.ld86 \
32          temp.awk.* vgabios.*.orig _vgabios_.*.c core *.bak .#*
33        cp VGABIOS-lgpl-latest.bin ../$(RELEASE).bin
34        cp VGABIOS-lgpl-latest.debug.bin ../$(RELEASE).debug.bin
35        cp VGABIOS-lgpl-latest.cirrus.bin ../$(RELEASE).cirrus.bin
36        cp VGABIOS-lgpl-latest.cirrus.debug.bin ../$(RELEASE).cirrus.debug.bin
37        tar czvf ../$(RELEASE).tgz --exclude CVS -C .. $(RELEASE)/
38
39vgabios.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
40        $(GCC) -E -P vgabios.c $(VGABIOS_VERS) $(VGABIOS_DATE) > _vgabios_.c
41        $(BCC) -o vgabios.s -C-c -D__i86__ -S -0 _vgabios_.c
42        sed -e 's/^\.text//' -e 's/^\.data//' vgabios.s > _vgabios_.s
43        $(AS86) _vgabios_.s -b vgabios.bin -u -w- -g -0 -j -O -l vgabios.txt
44        rm -f _vgabios_.s _vgabios_.c vgabios.s
45        cp vgabios.bin VGABIOS-lgpl-latest.bin
46        ./biossums VGABIOS-lgpl-latest.bin
47        ls -l VGABIOS-lgpl-latest.bin
48
49vgabios.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h vbe.h vbe.c vbetables.h
50        $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DDEBUG $(VGABIOS_DATE) > _vgabios-debug_.c
51        $(BCC) -o vgabios-debug.s -C-c -D__i86__ -S -0 _vgabios-debug_.c
52        sed -e 's/^\.text//' -e 's/^\.data//' vgabios-debug.s > _vgabios-debug_.s
53        $(AS86) _vgabios-debug_.s -b vgabios.debug.bin -u -w- -g -0 -j -O -l vgabios.debug.txt
54        rm -f _vgabios-debug_.s _vgabios-debug_.c vgabios-debug.s
55        cp vgabios.debug.bin VGABIOS-lgpl-latest.debug.bin
56        ./biossums VGABIOS-lgpl-latest.debug.bin
57        ls -l VGABIOS-lgpl-latest.debug.bin
58
59vgabios-cirrus.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
60        $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS $(VGABIOS_DATE) > _vgabios-cirrus_.c
61        $(BCC) -o vgabios-cirrus.s -C-c -D__i86__ -S -0 _vgabios-cirrus_.c
62        sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus.s > _vgabios-cirrus_.s
63        $(AS86) _vgabios-cirrus_.s -b vgabios-cirrus.bin -u -w- -g -0 -j -O -l vgabios-cirrus.txt
64        rm -f _vgabios-cirrus_.s _vgabios-cirrus_.c vgabios-cirrus.s
65        cp vgabios-cirrus.bin VGABIOS-lgpl-latest.cirrus.bin
66        ./biossums VGABIOS-lgpl-latest.cirrus.bin
67        ls -l VGABIOS-lgpl-latest.cirrus.bin
68
69vgabios-cirrus.debug.bin: biossums vgabios.c vgabios.h vgafonts.h vgatables.h clext.c
70        $(GCC) -E -P vgabios.c $(VGABIOS_VERS) -DCIRRUS -DCIRRUS_DEBUG $(VGABIOS_DATE) > _vgabios-cirrus-debug_.c
71        $(BCC) -o vgabios-cirrus-debug.s -C-c -D__i86__ -S -0 _vgabios-cirrus-debug_.c
72        sed -e 's/^\.text//' -e 's/^\.data//' vgabios-cirrus-debug.s > _vgabios-cirrus-debug_.s
73        $(AS86) _vgabios-cirrus-debug_.s -b vgabios-cirrus.debug.bin -u -w- -g -0 -j -O -l vgabios-cirrus.debug.txt
74        rm -f _vgabios-cirrus-debug_.s _vgabios-cirrus-debug_.c vgabios-cirrus-debug.s
75        cp vgabios-cirrus.debug.bin VGABIOS-lgpl-latest.cirrus.debug.bin
76        ./biossums VGABIOS-lgpl-latest.cirrus.debug.bin
77        ls -l VGABIOS-lgpl-latest.cirrus.debug.bin
78
79biossums: biossums.c
80        $(CC) -o biossums biossums.c
Note: See TracBrowser for help on using the repository browser.