Adding upstream version 4.00~pre54+dfsg.
[syslinux-debian/hramrach.git] / linux / Makefile
blobc3877f23800afec88bf155bc7475ea390f7db33c
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.
11 ## -----------------------------------------------------------------------
14 ## Linux FAT installer
17 topdir = ..
18 include $(topdir)/MCONFIG
20 OPTFLAGS = -g -O0 -Dalloca=malloc
21 INCLUDES = -I. -I.. -I../libinstaller
22 CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
23 LDFLAGS =
25 SRCS = syslinux.c \
26 ../libinstaller/syslxopt.c \
27 ../libinstaller/syslxcom.c \
28 ../libinstaller/setadv.c \
29 ../libinstaller/fat.c \
30 ../libinstaller/syslxmod.c \
31 ../libinstaller/bootsect_bin.c \
32 ../libinstaller/ldlinux_bin.c
33 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
35 .SUFFIXES: .c .o .i .s .S
37 VPATH = .:../libinstaller
39 all: installer
41 tidy dist:
42 -rm -f *.o *.i *.s *.a .*.d *.tmp
44 clean: tidy
45 -rm -f syslinux syslinux-nomtools
47 spotless: clean
48 -rm -f *~
50 installer: syslinux syslinux-nomtools
52 syslinux: $(OBJS)
53 $(CC) $(LDFLAGS) -o $@ $^
55 syslinux-nomtools: syslinux
56 ln -f $< $@
58 %.o: %.c
59 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
60 %.i: %.c
61 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
62 %.s: %.c
63 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
65 -include .*.d *.tmp