isohybrid: remove Perl modules we don't actually need
[syslinux.git] / mtools / Makefile
blobb0f0a1945c5e032b6575c3123f6bdee0eda978aa
1 topdir = ..
2 include $(topdir)/MCONFIG
4 OPTFLAGS = -g -Os
5 INCLUDES = -I. -I.. -I../libfat -I../libinstaller
6 CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
7 LDFLAGS = -s
9 SRCS = syslinux.c \
10 ../libinstaller/syslxmod.c \
11 ../libinstaller/bootsect_bin.c \
12 ../libinstaller/ldlinux_bin.c \
13 $(wildcard ../libfat/*.c)
14 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
16 .SUFFIXES: .c .o .i .s .S
18 VPATH = .:../libfat:../libinstaller
20 all: installer
22 tidy dist:
23 -rm -f *.o *.i *.s *.a .*.d *.tmp
25 clean: tidy
26 -rm -f syslinux
28 spotless: clean
29 -rm -f *~
31 installer: syslinux
33 syslinux: $(OBJS)
34 $(CC) $(LDFLAGS) -o $@ $^
36 %.o: %.c
37 $(CC) -Wp,-MT,$@,-MMD,.$@.d $(CFLAGS) -c -o $@ $<
38 %.i: %.c
39 $(CC) $(CFLAGS) -E -o $@ $<
40 %.s: %.c
41 $(CC) $(CFLAGS) -S -o $@ $<
43 -include .*.d *.tmp