summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/dos/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/dos/Makefile')
-rw-r--r--contrib/syslinux-4.02/dos/Makefile78
1 files changed, 78 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/dos/Makefile b/contrib/syslinux-4.02/dos/Makefile
new file mode 100644
index 0000000..2667de8
--- /dev/null
+++ b/contrib/syslinux-4.02/dos/Makefile
@@ -0,0 +1,78 @@
+## -----------------------------------------------------------------------
+##
+## Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+## Boston MA 02111-1307, USA; either version 2 of the License, or
+## (at your option) any later version; incorporated herein by reference.
+##
+## -----------------------------------------------------------------------
+
+##
+## MS-DOS FAT installer
+##
+
+topdir = ..
+include $(topdir)/MCONFIG.embedded
+
+CFLAGS += -D__MSDOS__
+# CFLAGS += -DDEBUG
+
+LDFLAGS = -T dosexe.ld
+OPTFLAGS = -g
+INCLUDES = -include code16.h -nostdinc -iwithprefix include \
+ -I. -I.. -I../libfat -I ../libinstaller -I ../libinstaller/getopt
+
+SRCS = syslinux.c \
+ ../libinstaller/fat.c \
+ ../libinstaller/syslxmod.c \
+ ../libinstaller/syslxopt.c \
+ ../libinstaller/setadv.c \
+ ../libinstaller/getopt/getopt_long.c \
+ ../libinstaller/bootsect_bin.c \
+ ../libinstaller/mbr_bin.c \
+ $(wildcard ../libfat/*.c)
+OBJS = header.o crt0.o ldlinux.o \
+ $(patsubst %.c,%.o,$(notdir $(SRCS)))
+LIBOBJS = int2526.o conio.o memcpy.o memset.o memmove.o skipatou.o atou.o \
+ malloc.o free.o getopt_long.o getsetsl.o strchr.o strtoul.o \
+ strntoumax.o argv.o printf.o __divdi3.o __udivmoddi4.o
+
+VPATH = .:../libfat:../libinstaller:../libinstaller/getopt
+
+TARGETS = syslinux.com
+
+all: $(TARGETS)
+
+tidy dist:
+ -rm -f *.o *.i *.s *.a .*.d *.tmp *.elf *.lst
+
+clean: tidy
+
+spotless: clean
+ -rm -f *~ $(TARGETS)
+
+installer:
+
+syslinux.elf: $(OBJS) dosexe.ld libcom.a
+ $(LD) $(LDFLAGS) -o $@ $(OBJS) libcom.a
+
+libcom.a: $(LIBOBJS)
+ -rm -f $@
+ $(AR) cq $@ $^
+ $(RANLIB) $@
+
+syslinux.com: syslinux.elf
+ $(OBJCOPY) -O binary $< $@
+ $(UPX) --lzma --ultra-brute $@ || \
+ $(UPX) --ultra-brute $@ || \
+ true
+
+%.com: %.asm
+ $(NASM) $(NASMOPT) -f bin -o $@ -MP -MD .$@.d -l $*.lst $<
+
+ldlinux.o: ldlinux.S ../core/ldlinux.sys
+
+-include .*.d *.tmp