dos/dosexe.ld: Work around linker issue in binutils 2.21.51
[syslinux.git] / mtools / Makefile
blob6164d24c4d07c7b803793519872aeb6d73ee7d1f
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/syslxopt.c \
13 ../libinstaller/setadv.c \
14 ../libinstaller/bootsect_bin.c \
15 ../libinstaller/ldlinux_bin.c \
16 $(wildcard ../libfat/*.c)
17 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
19 .SUFFIXES: .c .o .i .s .S
21 VPATH = .:../libfat:../libinstaller
23 all: installer
25 tidy dist:
26 -rm -f *.o *.i *.s *.a .*.d *.tmp
28 clean: tidy
29 -rm -f syslinux
31 spotless: clean
32 -rm -f *~
34 installer: syslinux
36 syslinux: $(OBJS)
37 $(CC) $(LDFLAGS) -o $@ $^
39 %.o: %.c
40 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
41 %.i: %.c
42 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
43 %.s: %.c
44 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
46 -include .*.d *.tmp