We need klibc-1.4.26 for getopt_long() to actually work.
[syslinux.git] / mtools / Makefile
blob26909a3030f1cff21d7e7a26e41221b6cd017ad3
1 CC = gcc
2 OPTFLAGS = -g -Os
3 INCLUDES = -I. -I.. -I../libfat
4 CFLAGS = -W -Wall -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
5 LDFLAGS = -s
7 SRCS = syslinux.c ../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c $(wildcard ../libfat/*.c)
8 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
10 .SUFFIXES: .c .o .i .s .S
12 VPATH = .:..:../libfat
14 all: installer
16 tidy:
17 -rm -f *.o *.i *.s *.a .*.d
19 clean: tidy
20 -rm -f syslinux
22 spotless: clean
23 -rm -f *~
25 installer: syslinux
27 syslinux: $(OBJS)
28 $(CC) $(LDFLAGS) -o $@ $^
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 $@ $<
37 -include .*.d