Makefile 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
  2. # This file is part of the Linux-8086 C library and is distributed
  3. # under the GNU Library General Public License.
  4. ASRC=msdos.c
  5. AOBJ= \
  6. dos_start.o __exterror.o __mkargv.o __mkenvp.o bdos.o \
  7. dos__fconv.o dos_abort.o dos_close.o dos_getmod.o dos_getvect.o \
  8. dos_isatty.o dos_lseek.o dos_open.o dos_read.o dos_segalloc.o \
  9. dos_segfree.o dos_setvect.o dos_stat.o dos_unlink.o dos_write.o
  10. BSRC=i86.c
  11. BOBJ= __seg_regs.o __peek_es.o __poke_es.o __deek_es.o __doke_es.o \
  12. __strnget_es.o __strchr_es.o __strlen_es.o int86.o int86x.o segread.o
  13. ifeq ($(LIB_CPU),i86)
  14. ifeq ($(LIB_OS),DOS)
  15. OBJ=$(AOBJ) $(BOBJ) time.o sound.o
  16. else
  17. OBJ=$(BOBJ)
  18. endif
  19. CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS)
  20. all: $(LIBC)
  21. @$(RM) $(OBJ)
  22. $(LIBC): $(LIBC)($(OBJ))
  23. $(LIBC)($(AOBJ)): $(ASRC)
  24. $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
  25. $(AR) $(ARFLAGS) $@ $*.o
  26. $(LIBC)($(BOBJ)): $(BSRC)
  27. $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o
  28. $(AR) $(ARFLAGS) $@ $*.o
  29. else
  30. all:
  31. @:
  32. endif
  33. clean:
  34. rm -f *.o libc.a