menu: quiet warnings in drain_keyboard()
[syslinux.git] / extlinux / Makefile
blobd915e5a9e2c340432b067d6f145fe1a89d342e8a
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 ext2/ext3 installer
17 topdir = ..
18 include $(topdir)/MCONFIG
20 OPTFLAGS = -g -Os
21 INCLUDES = -I. -I.. -I../libinstaller
22 CFLAGS = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
23 $(OPTFLAGS) $(INCLUDES)
24 LDFLAGS = # -s
26 SRCS = main.c \
27 ../libinstaller/setadv.c \
28 ../libinstaller/extlinux_bss_bin.c \
29 ../libinstaller/extlinux_sys_bin.c
30 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
32 .SUFFIXES: .c .o .i .s .S
34 VPATH = .:../libinstaller
36 all: installer
38 tidy dist:
39 -rm -f *.o *.i *.s *.a .*.d *.tmp
41 clean: tidy
42 -rm -f extlinux
44 spotless: clean
45 -rm -f *~
47 installer: extlinux
49 extlinux: $(OBJS)
50 $(CC) $(LDFLAGS) -o $@ $^
52 %.o: %.c
53 $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
54 %.i: %.c
55 $(CC) $(CFLAGS) -E -o $@ $<
56 %.s: %.c
57 $(CC) $(CFLAGS) -S -o $@ $<
59 -include .*.d *.tmp