diff options
Diffstat (limited to 'libc/bios/Makefile')
-rw-r--r-- | libc/bios/Makefile | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/libc/bios/Makefile b/libc/bios/Makefile index 934ec07..5fcc964 100644 --- a/libc/bios/Makefile +++ b/libc/bios/Makefile @@ -2,29 +2,34 @@ # This file is part of the Linux-8086 C library and is distributed # under the GNU Library General Public License. -TOP=.. -include $(TOP)/Make.defs - ifeq ($(LIB_OS),BIOS) ASRC=bios.c AOBJ=bios_start.o bios_isatty.o \ bios_open.o bios_read.o bios_write.o bios_lseek.o bios_close.o BSRC=bios_vid.c -BOBJ=bios_putc.o bios_getc.o bios_rdline.o -endif +BOBJ=bios_putc.o bios_getc.o bios_khit.o bios_rdline.o -all: $(AOBJ) $(BOBJ) +OBJ=$(AOBJ) $(BOBJ) -libc.a: $(AOBJ) $(BOBJ) - ar r ../$(LIBC) $(AOBJ) $(BOBJ) - @touch libc.a +CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) -clean: - rm -f *.o libc.a +all: $(LIBC)($(OBJ)) + @: -$(AOBJ): $(ASRC) - $(CC) $(CFLAGS) -c -DL_$* -o $@ $(ASRC) +$(LIBC)($(AOBJ)): $(ASRC) + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(AR) $(ARFLAGS) $@ $*.o + $(RM) $*.o -$(BOBJ): $(BSRC) - $(CC) $(CFLAGS) -c -DL_$* -o $@ $(BSRC) +$(LIBC)($(BOBJ)): $(BSRC) + $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o + $(AR) $(ARFLAGS) $@ $*.o + $(RM) $*.o +else +all: + @: +endif + +clean: + rm -f *.o libc.a |