Magellan Linux

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

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: 2480 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 # The targets to build in this directory...
30 BTARGET = kwdhash.gen isolinux.bin
31
32 # All primary source files for the main syslinux files
33 NASMSRC = $(wildcard *.asm)
34 NASMHDR = $(wildcard *.inc)
35 CSRC = $(wildcard *.c)
36 CHDR = $(wildcard *.h)
37 OTHERSRC = keywords
38 ALLSRC = $(NASMSRC) $(NASMHDR) $(CSRC) $(CHDR) $(OTHERSRC)
39
40 # The DATE is set on the make command line when building binaries for
41 # official release. Otherwise, substitute a hex string that is pretty much
42 # guaranteed to be unique to be unique from build to build.
43 ifndef HEXDATE
44 HEXDATE := $(shell $(PERL) now.pl $(SRCS))
45 endif
46 ifndef DATE
47 DATE := $(shell sh gen-id.sh $(VERSION) $(HEXDATE))
48 endif
49
50 all: $(BTARGET)
51
52 kwdhash.gen: keywords genhash.pl
53 $(PERL) genhash.pl < keywords > kwdhash.gen
54
55 .PRECIOUS: %.elf
56
57 # Standard rule for {isolinux,isolinux-debug}.bin
58 iso%.bin: iso%.elf checksumiso.pl
59 $(OBJCOPY) -O binary $< $@
60 $(PERL) checksumiso.pl $@
61
62 %.o: %.asm kwdhash.gen version.gen
63 ( $(NASM) -M -DDEPEND $(NINCLUDE) -o $@ $< ; echo '' ) > .$@.d; true
64 $(NASM) $(NASMOPT) -f elf -g -F stabs -DDATE_STR="'$(DATE)'" \
65 -DHEXDATE="$(HEXDATE)" \
66 -l $(@:.o=.lsr) -o $@ $<
67
68 %.elf: %.o syslinux.ld
69 $(LD) $(LDFLAGS) -T syslinux.ld -M -o $@ $< > $(@:.elf=.map)
70 $(OBJDUMP) -h $@ > $(@:.elf=.sec)
71 $(PERL) lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst)
72
73 install: installer
74
75 install-lib: installer
76
77 install-all: install install-lib
78
79 netinstall: installer
80
81 tidy dist:
82 rm -f codepage.cp *.o *.elf stupid.* patch.offset .depend .*.d
83 rm -f *.lsr *.lst *.map *.sec
84 rm -f $(OBSOLETE)
85 rm -f $(BTARGET) *.bin *_bin.c
86
87 clean: tidy
88
89 # Include dependencies file
90 -include .*.d