Use PRIu64 instead of %llu, where appropriate
[profile/ivi/syslinux.git] / mtools / Makefile
1 topdir = ..
2 MAKEDIR = $(topdir)/mk
3 include $(MAKEDIR)/syslinux.mk
4
5 OPTFLAGS = -g -Os
6 INCLUDES = -I. -I.. -I../libfat -I../libinstaller
7 CFLAGS   = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES)
8 LDFLAGS  = 
9
10 SRCS     = syslinux.c \
11            ../libinstaller/fat.c \
12            ../libinstaller/syslxmod.c \
13            ../libinstaller/syslxopt.c \
14            ../libinstaller/setadv.c \
15            ../libinstaller/bootsect_bin.c \
16            ../libinstaller/ldlinux_bin.c \
17            $(wildcard ../libfat/*.c)
18 OBJS     = $(patsubst %.c,%.o,$(notdir $(SRCS)))
19
20 .SUFFIXES: .c .o .i .s .S
21
22 VPATH = .:../libfat:../libinstaller
23
24 all: installer
25
26 tidy dist:
27         -rm -f *.o *.i *.s *.a .*.d *.tmp
28
29 clean: tidy
30         -rm -f syslinux
31
32 spotless: clean
33         -rm -f *~
34
35 installer: syslinux
36
37 syslinux: $(OBJS)
38         $(CC) $(LDFLAGS) -o $@ $^
39
40 strip:
41         $(STRIP) syslinux
42
43 %.o: %.c
44         $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
45 %.i: %.c
46         $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
47 %.s: %.c
48         $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
49
50 -include .*.d *.tmp