Doing initial split of extlinux-update into sub-scripts (Closes: #587727).
[syslinux-debian/hramrach.git] / mtools / Makefile
blob3f9c42b3f2828a0fda86303b7d4778412e2b2b6b
1 include $(MAKEDIR)/syslinux.mk
3 OPTFLAGS = -g -Os
4 INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libfat -I$(SRC)/../libinstaller
5 CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
6 LDFLAGS =
8 SRCS = syslinux.c \
9 ../libinstaller/fs.c \
10 ../libinstaller/syslxmod.c \
11 ../libinstaller/syslxopt.c \
12 ../libinstaller/setadv.c \
13 ../libinstaller/bootsect_bin.c \
14 ../libinstaller/ldlinux_bin.c \
15 ../libinstaller/ldlinuxc32_bin.c \
16 $(wildcard $(SRC)/../libfat/*.c)
17 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
19 .SUFFIXES: .c .o .i .s .S
21 VPATH = $(SRC):$(SRC)/../libfat:$(SRC)/../libinstaller:$(OBJ)/../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 strip:
40 $(STRIP) syslinux
42 %.o: %.c
43 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
44 %.i: %.c
45 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
46 %.s: %.c
47 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
49 -include .*.d *.tmp