syslinux-3.08-2 sources from FC4
[bootcd.git] / syslinux / extlinux / Makefile
1 CC       = gcc
2 OPTFLAGS = -g -Os
3 INCLUDES = -I. -I.. -I../libfat
4 CFLAGS   = -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
5 LDFLAGS  = -s
6
7 SRCS     = extlinux.c ../extlinux_bss_bin.c ../extlinux_sys_bin.c
8 OBJS     = $(patsubst %.c,%.o,$(notdir $(SRCS)))
9
10 .SUFFIXES: .c .o .i .s .S
11
12 VPATH = .:..
13
14 all: installer
15
16 tidy:
17         -rm -f *.o *.i *.s *.a .*.d
18
19 clean: tidy
20         -rm -f extlinux
21
22 spotless: clean
23         -rm -f *~
24
25 installer: extlinux
26
27 extlinux: $(OBJS)
28         $(CC) $(LDFLAGS) -o $@ $^
29
30 %.o: %.c
31         $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
32 %.i: %.c
33         $(CC) $(CFLAGS) -E -o $@ $<
34 %.s: %.c
35         $(CC) $(CFLAGS) -S -o $@ $<
36
37 -include .*.d
38
39
40