Annotation of /tags/mkinitrd-6_5_2/isolinux/Makefile
Parent Directory | Revision Log
Revision 1522 -
(hide annotations)
(download)
Wed Sep 7 18:40:16 2011 UTC (13 years ago) by niro
File size: 2771 byte(s)
Wed Sep 7 18:40:16 2011 UTC (13 years ago) by niro
File size: 2771 byte(s)
tagged 'mkinitrd-6_5_2'
1 | niro | 532 | ## ----------------------------------------------------------------------- |
2 | ## | ||
3 | niro | 1133 | ## Copyright 1998-2009 H. Peter Anvin - All Rights Reserved |
4 | ## Copyright 2009 Intel Corporation; author: H. Peter Anvin | ||
5 | ## | ||
6 | niro | 532 | ## 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 | niro | 1133 | # Makefile for the SYSLINUX core |
16 | niro | 532 | # |
17 | |||
18 | niro | 1133 | # No builtin rules |
19 | MAKEFLAGS += -r | ||
20 | MAKE += -r | ||
21 | niro | 532 | |
22 | niro | 1133 | topdir = . |
23 | include $(topdir)/MCONFIG.embedded | ||
24 | -include $(topdir)/version.mk | ||
25 | niro | 532 | |
26 | niro | 1133 | OPTFLAGS = |
27 | INCLUDES = | ||
28 | niro | 532 | |
29 | niro | 1133 | # The targets to build in this directory... |
30 | BTARGET = kwdhash.gen isolinux.bin | ||
31 | niro | 532 | |
32 | niro | 1133 | # 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 | niro | 532 | |
40 | niro | 1135 | MKINITRD_VERSION = $(shell cat ../VERSION) |
41 | |||
42 | DOCS = COPYING NEWS README TODO BUGS VERSION isolinux.txt | ||
43 | |||
44 | LIBDIR = /usr/lib/mkinitrd | ||
45 | DOCDIR = /usr/share/doc/mkinitrd-$(MKINITRD_VERSION)/isolinux | ||
46 | |||
47 | niro | 532 | # The DATE is set on the make command line when building binaries for |
48 | # official release. Otherwise, substitute a hex string that is pretty much | ||
49 | # guaranteed to be unique to be unique from build to build. | ||
50 | ifndef HEXDATE | ||
51 | niro | 1133 | HEXDATE := $(shell $(PERL) now.pl $(SRCS)) |
52 | niro | 532 | endif |
53 | ifndef DATE | ||
54 | niro | 1133 | DATE := $(shell sh gen-id.sh $(VERSION) $(HEXDATE)) |
55 | niro | 532 | endif |
56 | |||
57 | niro | 1133 | all: $(BTARGET) |
58 | |||
59 | kwdhash.gen: keywords genhash.pl | ||
60 | $(PERL) genhash.pl < keywords > kwdhash.gen | ||
61 | |||
62 | .PRECIOUS: %.elf | ||
63 | |||
64 | # Standard rule for {isolinux,isolinux-debug}.bin | ||
65 | iso%.bin: iso%.elf checksumiso.pl | ||
66 | $(OBJCOPY) -O binary $< $@ | ||
67 | niro | 532 | $(PERL) checksumiso.pl $@ |
68 | |||
69 | niro | 1133 | %.o: %.asm kwdhash.gen version.gen |
70 | ( $(NASM) -M -DDEPEND $(NINCLUDE) -o $@ $< ; echo '' ) > .$@.d; true | ||
71 | $(NASM) $(NASMOPT) -f elf -g -F stabs -DDATE_STR="'$(DATE)'" \ | ||
72 | -DHEXDATE="$(HEXDATE)" \ | ||
73 | -l $(@:.o=.lsr) -o $@ $< | ||
74 | niro | 532 | |
75 | niro | 1133 | %.elf: %.o syslinux.ld |
76 | $(LD) $(LDFLAGS) -T syslinux.ld -M -o $@ $< > $(@:.elf=.map) | ||
77 | $(OBJDUMP) -h $@ > $(@:.elf=.sec) | ||
78 | $(PERL) lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst) | ||
79 | |||
80 | niro | 1135 | install: |
81 | mkdir -p $(DESTDIR)/$(LIBDIR) | ||
82 | mkdir -p $(DESTDIR)/$(DOCDIR) | ||
83 | install -m755 -c isolinux.bin $(DESTDIR)/$(LIBDIR) | ||
84 | for n in $(DOCS); do install -m644 $$n $(DESTDIR)/$(DOCDIR); done | ||
85 | niro | 1133 | |
86 | tidy dist: | ||
87 | rm -f codepage.cp *.o *.elf stupid.* patch.offset .depend .*.d | ||
88 | rm -f *.lsr *.lst *.map *.sec | ||
89 | rm -f $(OBSOLETE) | ||
90 | rm -f $(BTARGET) *.bin *_bin.c | ||
91 | |||
92 | clean: tidy | ||
93 | |||
94 | # Include dependencies file | ||
95 | -include .*.d |