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. 10 ## 11 ## ----------------------------------------------------------------------- 12 13 ## 14 ## Linux FAT/NTFS installer 15 ## 16 17 include $(MAKEDIR)/syslinux.mk 18 19 OPTFLAGS = -g -Os 20 INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller 21 CFLAGS = $(GCCWARN) -D_FILE_OFFSET_BITS=64 $(OPTFLAGS) $(INCLUDES) 22 LDFLAGS = 23 24 SRCS = syslinux.c \ 25 ../libinstaller/syslxopt.c \ 26 ../libinstaller/syslxcom.c \ 27 ../libinstaller/setadv.c \ 28 ../libinstaller/advio.c \ 29 ../libinstaller/fs.c \ 30 ../libinstaller/syslxmod.c \ 31 ../libinstaller/bootsect_bin.c \ 32 ../libinstaller/ldlinuxc32_bin.c \ 33 ../libinstaller/ldlinux_bin.c 34 OBJS = $(patsubst %.c,%.o,$(notdir $(SRCS))) 35 36 .SUFFIXES: .c .o .i .s .S 37 38 VPATH = $(SRC):$(SRC)/../libinstaller:$(OBJ)/../libinstaller 39 40 all: installer 41 42 tidy dist: 43 -rm -f *.o *.i *.s *.a .*.d *.tmp 44 45 clean: tidy 46 -rm -f syslinux syslinux-nomtools 47 48 spotless: clean 49 -rm -f *~ 50 51 installer: syslinux syslinux-nomtools 52 53 syslinux: $(OBJS) 54 $(CC) $(LDFLAGS) -o $@ $^ 55 56 syslinux-nomtools: syslinux 57 ln -f $< $@ 58 59 strip: 60 $(STRIP) syslinux syslinux-nomtools 61 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 $@ $< 68 69 -include .*.d 70