diff options
Diffstat (limited to 'sample/Makefile')
-rw-r--r-- | sample/Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sample/Makefile b/sample/Makefile index 8560b3e1..d1147e06 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -20,12 +20,17 @@ include $(topdir)/MCONFIG.embedded INCLUDES = -I$(com32)/include PPMTOLSS16 = $(topdir)/utils/ppmtolss16 +LIBGCC := $(shell $(CC) $(GCCOPT) --print-libgcc) LIB = liboldcom32.a LIBOBJS = conio.o atou.o skipatou.o printf.o c32exit.o +com32 = $(topdir)/com32 +C_LIBS = $(com32)/libutil/libutil_com.a $(com32)/lib/libcom32.a $(LIBGCC) +LDFLAGS = -m elf_i386 -T $(com32)/lib/com32.ld + all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \ - fd.c32 $(LIB) + fd.c32 hdt.c32 $(LIB) .PRECIOUS: %.o %.o: %.S @@ -39,6 +44,12 @@ all: syslogo.lss comecho.com hello.c32 hello2.c32 filetest.c32 c32echo.c32 \ %.elf: c32entry.o %.o $(LIB) $(LD) -Ttext 0x101000 -e _start -o $@ $^ +hdt.o: hdt.c + $(CC) $(CFLAGS) -I$(topdir)/menu/libmenu/ -c -o $@ $< + +hdt.elf: hdt.o $(com32)/modules/cpuid.o $(topdir)/menu/libmenu/libmenu.a $(LIB) $(C_LIBS) + $(LD) $(LDFLAGS) -o $@ $^ + %.c32: %.elf $(OBJCOPY) -O binary $< $@ |