sdi.c32: support gzipped SDI images
[syslinux.git] / linux / Makefile
blob00fa07655c50d55ed43681ae8a08aaf3c56dd7d4
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 -Os
21 INCLUDES = -I. -I.. -I../libinstaller
22 CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
23 LDFLAGS = -s
25 SRCS = syslinux.c \
26 ../libinstaller/syslxmod.c \
27 ../libinstaller/bootsect_bin.c \
28 ../libinstaller/ldlinux_bin.c
29 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
31 .SUFFIXES: .c .o .i .s .S
33 VPATH = .:../libinstaller
35 all: installer
37 tidy dist:
38 -rm -f *.o *.i *.s *.a .*.d *.tmp
40 clean: tidy
41 -rm -f syslinux syslinux-nomtools
43 spotless: clean
44 -rm -f *~
46 installer: syslinux syslinux-nomtools
48 syslinux: $(OBJS)
49 $(CC) $(LDFLAGS) -o $@ $^
51 syslinux-nomtools: syslinux
52 ln -f $< $@
54 %.o: %.c
55 $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
56 %.i: %.c
57 $(CC) $(CFLAGS) -E -o $@ $<
58 %.s: %.c
59 $(CC) $(CFLAGS) -S -o $@ $<
61 -include .*.d *.tmp