Magellan Linux

Contents of /trunk/mkinitrd-magellan/isolinux/Makefile.sik

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1133 - (show annotations) (download)
Thu Aug 19 09:50:43 2010 UTC (13 years, 8 months ago) by niro
File size: 2857 byte(s)
-updated to isolinux-3.86
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 1998-2009 H. Peter Anvin - All Rights Reserved
4 ## Copyright 2009 Intel Corporation; author: H. Peter Anvin
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 ## Boston MA 02111-1307, USA; either version 2 of the License, or
10 ## (at your option) any later version; incorporated herein by reference.
11 ##
12 ## -----------------------------------------------------------------------
13
14 #
15 # Makefile for the SYSLINUX core
16 #
17
18 # No builtin rules
19 MAKEFLAGS += -r
20 MAKE += -r
21
22 topdir = .
23 include $(topdir)/MCONFIG.embedded
24 -include $(topdir)/version.mk
25
26 OPTFLAGS =
27 INCLUDES =
28
29 # This is very similar to cp437; technically it's for Norway and Denmark,
30 # but it's unlikely the characters that are different will be used in
31 # filenames by other users.
32 CODEPAGE = cp865
33
34 # The targets to build in this directory...
35 BTARGET = kwdhash.gen isolinux.bin
36
37 # All primary source files for the main syslinux files
38 NASMSRC = $(wildcard *.asm)
39 NASMHDR = $(wildcard *.inc)
40 CSRC = $(wildcard *.c)
41 CHDR = $(wildcard *.h)
42 OTHERSRC = keywords
43 ALLSRC = $(NASMSRC) $(NASMHDR) $(CSRC) $(CHDR) $(OTHERSRC)
44
45 # The DATE is set on the make command line when building binaries for
46 # official release. Otherwise, substitute a hex string that is pretty much
47 # guaranteed to be unique to be unique from build to build.
48 ifndef HEXDATE
49 HEXDATE := $(shell $(PERL) now.pl $(SRCS))
50 endif
51 ifndef DATE
52 DATE := $(shell sh gen-id.sh $(VERSION) $(HEXDATE))
53 endif
54
55 all: codepage $(BTARGET)
56
57 codepage/%.cp:
58 $(MAKE) -C codepage $@
59
60 kwdhash.gen: keywords genhash.pl
61 $(PERL) genhash.pl < keywords > kwdhash.gen
62
63 .PRECIOUS: %.elf
64
65 # Standard rule for {isolinux,isolinux-debug}.bin
66 iso%.bin: iso%.elf checksumiso.pl
67 $(OBJCOPY) -O binary $< $@
68 $(PERL) checksumiso.pl $@
69
70 %.o: %.asm kwdhash.gen version.gen
71 ( $(NASM) -M -DDEPEND $(NINCLUDE) -o $@ $< ; echo '' ) > .$@.d; true
72 $(NASM) $(NASMOPT) -f elf -g -F stabs -DDATE_STR="'$(DATE)'" \
73 -DHEXDATE="$(HEXDATE)" \
74 -l $(@:.o=.lsr) -o $@ $<
75
76 %.elf: %.o syslinux.ld
77 $(LD) $(LDFLAGS) -T syslinux.ld -M -o $@ $< > $(@:.elf=.map)
78 $(OBJDUMP) -h $@ > $(@:.elf=.sec)
79 $(PERL) lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst)
80
81 # NASM prior to 2.03 wouldn't auto-generate this dependency...
82 ldlinux.o: codepage.cp
83
84 codepage.cp: codepage/$(CODEPAGE).cp
85 cp -f $< $@
86
87 install: installer
88
89 install-lib: installer
90
91 install-all: install install-lib
92
93 netinstall: installer
94
95 tidy dist:
96 rm -f codepage.cp *.o *.elf stupid.* patch.offset .depend .*.d
97 rm -f *.lsr *.lst *.map *.sec
98 rm -f $(OBSOLETE)
99 rm -f $(BTARGET) *.bin *_bin.c
100
101 clean: tidy
102
103 # Include dependencies file
104 -include .*.d