1 include $(MAKEDIR)/syslinux.mk 2 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 = 7 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))) 18 19 .SUFFIXES: .c .o .i .s .S 20 21 VPATH = $(SRC):$(SRC)/../libfat:$(SRC)/../libinstaller:$(OBJ)/../libinstaller 22 23 all: installer 24 25 tidy dist: 26 -rm -f *.o *.i *.s *.a .*.d *.tmp 27 28 clean: tidy 29 -rm -f syslinux 30 31 spotless: clean 32 -rm -f *~ 33 34 installer: syslinux 35 36 syslinux: $(OBJS) 37 $(CC) $(LDFLAGS) -o $@ $^ 38 39 strip: 40 $(STRIP) syslinux 41 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 $@ $< 48 49 -include .*.d 50