aboutsummaryrefslogtreecommitdiffstats
path: root/dos/Makefile
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-05-29 15:11:38 -0700
commitb536209dfb7bd50c37061735fe10d2c19a97d26d (patch)
tree9d8ca6882fc5d9721fb0efea1abfd6dc09886814 /dos/Makefile
parent3ec40a0119587f63411475c76c69f9db24c7598e (diff)
downloadsyslinux.git-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.gz
syslinux.git-b536209dfb7bd50c37061735fe10d2c19a97d26d.tar.xz
syslinux.git-b536209dfb7bd50c37061735fe10d2c19a97d26d.zip
Move files out of root into core, dos, and utils
Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
Diffstat (limited to 'dos/Makefile')
-rw-r--r--dos/Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/dos/Makefile b/dos/Makefile
index 04550dab..85df1509 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -9,35 +9,38 @@ M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-ffreestanding,) \
$(call gcc_ok,-fno-stack-protector,) \
$(call gcc_ok,-fno-top-level-reorder,$(call gcc_ok,-fno-unit-at-a-time))
-LD = ld -m elf_i386
+NASM = nasm
+NASMOPT = -O9999
+
+LD = ld
+LDFLAGS = -m elf_i386 -T com16.ld
OBJCOPY = objcopy
OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=0 -fomit-frame-pointer
INCLUDES = -include code16.h -nostdinc -iwithprefix include \
-I. -I.. -I../libfat -I ../libinstaller
CFLAGS = $(M32) -mregparm=3 -DREGPARM=3 -W -Wall -msoft-float $(OPTFLAGS) $(INCLUDES)
-LDFLAGS = -T com16.ld
AR = ar
RANLIB = ranlib
LIBGCC := $(shell $(CC) --print-libgcc)
SRCS = syslinux.c \
../libinstaller/syslxmod.c \
- ../bootsect_bin.c ../ldlinux_bin.c ../mbr_bin.c \
+ ../core/bootsect_bin.c ../core/ldlinux_bin.c ../mbr/mbr_bin.c \
$(wildcard ../libfat/*.c)
OBJS = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
LIBOBJS = conio.o memcpy.o memset.o skipatou.o atou.o malloc.o free.o \
argv.o printf.o __divdi3.o __udivmoddi4.o
-.SUFFIXES: .c .o .i .s .S .elf .com
+.SUFFIXES: .c .o .i .s .S .elf .com .asm .lst
-VPATH = .:..:../libfat:../libinstaller
+VPATH = .:../libfat:../libinstaller:../core:../mbr
-TARGETS = syslinux.com
+TARGETS = syslinux.com copybs.com
all: $(TARGETS)
-tidy:
- -rm -f *.o *.i *.s *.a .*.d *.elf
+tidy dist:
+ -rm -f *.o *.i *.s *.a .*.d *.elf *.lst
clean: tidy
@@ -67,5 +70,7 @@ syslinux.com: syslinux.elf
$(CC) -Wp,-MT,$@,-MD,.$@.d $(CFLAGS) -D__ASSEMBLY__ -c -o $@ $<
%.s: %.S
$(CC) $(CFLAGS) -E -o $@ $<
+%.com: %.asm
+ $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $<
-include .*.d