version: Update to 4.08, update year to 2014
[syslinux/sherbszt.git] / mtools / Makefile
blob78cea1e27e9c51e72b09445d697f2e002b4ef20e
1 topdir = ..
2 MAKEDIR = $(topdir)/mk
3 include $(MAKEDIR)/syslinux.mk
5 OPTFLAGS = -g -Os
6 INCLUDES = -I. -I.. -I../libfat -I../libinstaller
7 CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
8 LDFLAGS =
10 SRCS = syslinux.c \
11 ../libinstaller/fs.c \
12 ../libinstaller/syslxmod.c \
13 ../libinstaller/syslxopt.c \
14 ../libinstaller/setadv.c \
15 ../libinstaller/bootsect_bin.c \
16 ../libinstaller/ldlinux_bin.c \
17 $(wildcard ../libfat/*.c)
18 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
20 .SUFFIXES: .c .o .i .s .S
22 VPATH = .:../libfat:../libinstaller
24 all: installer
26 tidy dist:
27 -rm -f *.o *.i *.s *.a .*.d *.tmp
29 clean: tidy
30 -rm -f syslinux
32 spotless: clean
33 -rm -f *~
35 installer: syslinux
37 syslinux: $(OBJS)
38 $(CC) $(LDFLAGS) -o $@ $^
40 strip:
41 $(STRIP) syslinux
43 %.o: %.c
44 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
45 %.i: %.c
46 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
47 %.s: %.c
48 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
50 -include .*.d *.tmp