initial import
[wyse_ntpd.git] / src / syslinux-5.10 / linux / Makefile
1 ## -----------------------------------------------------------------------
2 ##
3 ##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
4 ##
5 ##   This program is free software; you can redistribute it and/or modify
6 ##   it under the terms of the GNU General Public License as published by
7 ##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ##   Boston MA 02111-1307, USA; either version 2 of the License, or
9 ##   (at your option) any later version; incorporated herein by reference.
10 ##
11 ## -----------------------------------------------------------------------
12
13 ##
14 ## Linux FAT/NTFS installer
15 ##
16
17 topdir = ..
18 MAKEDIR = $(topdir)/mk
19 include $(MAKEDIR)/syslinux.mk
20
21 OPTFLAGS = -g -Os
22 INCLUDES = -I. -I.. -I../libinstaller
23 CFLAGS   = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
24 LDFLAGS  = -static
25
26 SRCS     = syslinux.c \
27            ../libinstaller/syslxopt.c \
28            ../libinstaller/syslxcom.c \
29            ../libinstaller/setadv.c \
30            ../libinstaller/advio.c \
31            ../libinstaller/fs.c \
32            ../libinstaller/syslxmod.c \
33            ../libinstaller/bootsect_bin.c \
34            ../libinstaller/ldlinuxc32_bin.c \
35            ../libinstaller/ldlinux_bin.c
36 OBJS     = $(patsubst %.c,%.o,$(notdir $(SRCS)))
37
38 .SUFFIXES: .c .o .i .s .S
39
40 VPATH = .:../libinstaller
41
42 all: installer
43
44 tidy dist:
45         -rm -f *.o *.i *.s *.a .*.d *.tmp
46
47 clean: tidy
48         -rm -f syslinux syslinux-nomtools
49
50 spotless: clean
51         -rm -f *~
52
53 installer: syslinux syslinux-nomtools
54
55 syslinux: $(OBJS)
56         $(CC) $(LDFLAGS) -o $@ $^
57
58 syslinux-nomtools: syslinux
59         ln -f $< $@
60
61 strip:
62         $(STRIP) syslinux syslinux-nomtools
63
64 %.o: %.c
65         $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
66 %.i: %.c
67         $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
68 %.s: %.c
69         $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
70
71 -include .*.d *.tmp