Merge remote branch 'debian/daniel'
[syslinux/sherbszt.git] / mtools / Makefile
blob70bed14cd0681de8489c84faef66498de3937431
1 topdir = ..
2 include $(topdir)/MCONFIG
4 OPTFLAGS = -g -Os
5 INCLUDES = -I. -I.. -I../libfat -I../libinstaller
6 CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
7 LDFLAGS = -s
9 SRCS = syslinux.c \
10 ../libinstaller/fat.c \
11 ../libinstaller/syslxmod.c \
12 ../libinstaller/setadv.c \
13 ../libinstaller/bootsect_bin.c \
14 ../libinstaller/ldlinux_bin.c \
15 $(wildcard ../libfat/*.c)
16 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
18 .SUFFIXES: .c .o .i .s .S
20 VPATH = .:../libfat:../libinstaller
22 all: installer
24 tidy dist:
25 -rm -f *.o *.i *.s *.a .*.d *.tmp
27 clean: tidy
28 -rm -f syslinux
30 spotless: clean
31 -rm -f *~
33 installer: syslinux
35 syslinux: $(OBJS)
36 $(CC) $(LDFLAGS) -o $@ $^
38 %.o: %.c
39 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
40 %.i: %.c
41 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
42 %.s: %.c
43 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
45 -include .*.d *.tmp