Merge remote-tracking branch 'origin/syslinux-4.xx' into syslinux-5.xx
[syslinux/sherbszt.git] / extlinux / Makefile
blobe33bd68972ec85bee290b9388c036a9caa471918
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 ## Linux vfat, ntfs, ext2/ext3/ext4 and btrfs installer
17 topdir = ..
18 MAKEDIR = $(topdir)/mk
19 include $(MAKEDIR)/syslinux.mk
21 OPTFLAGS = -g -Os
22 INCLUDES = -I. -I.. -I../libinstaller
23 CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \
24 $(OPTFLAGS) $(INCLUDES)
25 LDFLAGS =
27 SRCS = main.c \
28 mountinfo.c \
29 ../libinstaller/syslxmod.c \
30 ../libinstaller/syslxopt.c \
31 ../libinstaller/syslxcom.c \
32 ../libinstaller/setadv.c \
33 ../libinstaller/advio.c \
34 ../libinstaller/bootsect_bin.c \
35 ../libinstaller/ldlinuxc32_bin.c \
36 ../libinstaller/ldlinux_bin.c
37 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS)))
39 .SUFFIXES: .c .o .i .s .S
41 VPATH = .:../libinstaller
43 all: installer
45 tidy dist:
46 -rm -f *.o *.i *.s *.a .*.d *.tmp
48 clean: tidy
49 -rm -f extlinux
51 spotless: clean
52 -rm -f *~
54 installer: extlinux
56 extlinux: $(OBJS)
57 $(CC) $(LDFLAGS) -o $@ $^
59 strip:
60 $(STRIP) extlinux
62 %.o: %.c
63 $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $<
64 %.i: %.c
65 $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $<
66 %.s: %.c
67 $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $<
69 -include .*.d