aboutsummaryrefslogtreecommitdiffstats
path: root/dos/Makefile
diff options
context:
space:
mode:
authorhpa <hpa>2004-12-18 21:18:07 +0000
committerhpa <hpa>2004-12-18 21:18:07 +0000
commit95e8ab8831926b37da94364f1fed78939eb9088a (patch)
tree71d19080dfbcbb8a723de47655f6024b555524a9 /dos/Makefile
parent7aa4bd96e4f8913f4b1812f48f73451008a9f91a (diff)
downloadsyslinux.git-95e8ab8831926b37da94364f1fed78939eb9088a.tar.gz
syslinux.git-95e8ab8831926b37da94364f1fed78939eb9088a.tar.xz
syslinux.git-95e8ab8831926b37da94364f1fed78939eb9088a.zip
Resurrect printf(), and create a library. This way we can use printf()
during debugging without having it linked in during production build.
Diffstat (limited to 'dos/Makefile')
-rw-r--r--dos/Makefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/dos/Makefile b/dos/Makefile
index 135fe31c..37b6f9b8 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -5,11 +5,15 @@ OPTFLAGS = -g -Os -march=i386 -falign-functions=0 -falign-jumps=0 -falign-loops=
INCLUDES = -include code16.h -I. -I.. -I../libfat
CFLAGS = -W -Wall -ffreestanding $(OPTFLAGS) $(INCLUDES)
LDFLAGS = -T com16.ld
+AR = ar
+RANLIB = ranlib
-SRCS = syslinux.c conio.c skipatou.c atou.c malloc.c free.c argv.c \
+SRCS = syslinux.c \
../syslxmod.c ../bootsect_bin.c ../ldlinux_bin.c \
$(wildcard ../libfat/*.c)
-OBJS = crt0.o memcpy.o memset.o $(patsubst %.c,%.o,$(notdir $(SRCS)))
+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
.SUFFIXES: .c .o .i .s .S .elf .com
@@ -28,9 +32,14 @@ spotless: clean
installer: syslinux.com
-syslinux.elf: $(OBJS)
+syslinux.elf: $(OBJS) libcom.a
$(LD) $(LDFLAGS) -o $@ $^
+libcom.a: $(LIBOBJS)
+ -rm -f $@
+ $(AR) cq $@ $^
+ $(RANLIB) $@
+
syslinux.com: syslinux.elf
$(OBJCOPY) -O binary $< $@