diff options
Diffstat (limited to 'dos/Makefile')
-rw-r--r-- | dos/Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/dos/Makefile b/dos/Makefile index 9d8ce33c..0bd7d41e 100644 --- a/dos/Makefile +++ b/dos/Makefile @@ -17,8 +17,10 @@ topdir = .. include $(topdir)/MCONFIG.embedded +CFLAGS += -D__MSDOS__ # CFLAGS += -DDEBUG -LDFLAGS = -T com16.ld + +LDFLAGS = -T dosexe.ld OPTFLAGS = -g INCLUDES = -include code16.h -nostdinc -iwithprefix include \ -I. -I.. -I../libfat -I ../libinstaller @@ -29,7 +31,7 @@ SRCS = syslinux.c \ ../libinstaller/ldlinux_bin.c \ ../libinstaller/mbr_bin.c \ $(wildcard ../libfat/*.c) -OBJS = crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS))) +OBJS = header.o crt0.o $(patsubst %.c,%.o,$(notdir $(SRCS))) LIBOBJS = int2526.o conio.o memcpy.o memset.o skipatou.o atou.o \ malloc.o free.o \ argv.o printf.o __divdi3.o __udivmoddi4.o @@ -50,8 +52,8 @@ spotless: clean installer: -syslinux.elf: $(OBJS) libcom.a com16.ld - $(LD) $(LDFLAGS) -o $@ $(filter-out %.ld,$^) +syslinux.elf: $(OBJS) dosexe.ld libcom.a + $(LD) $(LDFLAGS) -o $@ $(OBJS) libcom.a libcom.a: $(LIBOBJS) -rm -f $@ @@ -60,9 +62,11 @@ libcom.a: $(LIBOBJS) syslinux.com: syslinux.elf $(OBJCOPY) -O binary $< $@ + $(UPX) --lzma --ultra-brute $@ || \ + $(UPX) --ultra-brute $@ || \ + true %.com: %.asm - ( $(NASM) -M -DDEPEND $(NASMOPT) -o $@ -M $< && echo '' ) > .$@.d; true - $(NASM) $(NASMOPT) -f bin -o $@ -l $*.lst $< + $(NASM) $(NASMOPT) -f bin -o $@ -MP -MD .$@.d -l $*.lst $< -include .*.d *.tmp |