home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / bootutil / bootmenu.lzh / bootmenu13.1 / Makefile < prev    next >
Makefile  |  1991-03-12  |  2KB  |  70 lines

  1. # This makefile supports all UNIX-like systems.
  2. # Uncomment one of the SYS definitions below, or
  3. # use a make command like:
  4. #    make SYS=esix
  5. # (For compiling on MS-DOS, see make_msc.bat)
  6. # (To compile on Minix, use:  make minix)
  7. #
  8. # Uncomment for Everex Systems (ESIX) Sys.V/386 Rel. 3.2
  9. #SYS=esix
  10. # Uncomment for Interactive Systems (ISC) Sys.V/386
  11. #SYS=i386
  12. # Uncomment for MSDOS with UNIX-style make (i.e. ndmake)
  13. #SYS=msdos
  14. # Uncomment for other UNIX-compatible systems (for testing)
  15. SYS=unix
  16.  
  17. # Compilation options:
  18. CC=cc
  19. CFLAGS=-g
  20.  
  21. FILES1=    README pfdisk.man Changes Makefile pfdisk.c syscodes.c \
  22.  syscodes.h sysdep.h s_esix.c s_i386.c s_unix.c s_msdos.c
  23. FILES2= bootmenu.doc pfdisk.doc SStor.txt bootmenu.asm bootauto.asm \
  24.  asm2bin.bat make_msc.bat bootmenu.hex bootauto.hex hex2bin.c
  25.  
  26. OBJS= pfdisk.o syscodes.o s_$(SYS).o
  27. LSRC= pfdisk.c syscodes.c s_$(SYS).c
  28.  
  29. test: pfdisk
  30.     (echo "g 1222 15 34";\
  31.      echo "1   4   0  127 MS-LOSS";\
  32.      echo "2 129 128  255 Minix";\
  33.      echo "4  99 256 1221 ESIX";\
  34.      echo "a 4"; echo l; echo 'q!' \
  35.     ) | pfdisk /dev/null
  36.  
  37. all: pfdisk bootmenu.bin bootauto.bin
  38.  
  39. pfdisk: $(OBJS)
  40.     $(CC) $(CFLAGS) -o $@ $(OBJS)
  41.  
  42. minix: bootmenu.bin bootauto.bin
  43.     $(CC) $(CFLAGS) -o pfdisk $(LSRC)
  44.  
  45. pfdisk.o : syscodes.h sysdep.h
  46. syscodes.o : syscodes.h
  47. s_$(SYS).o : sysdep.h
  48.  
  49. lint: $(LSRC)
  50.     lint $(CFLAGS) $(LSRC)
  51.  
  52. bootmenu.bin: hex2bin
  53.     hex2bin <bootmenu.hex bootmenu.bin
  54. bootauto.bin: hex2bin
  55.     hex2bin <bootauto.hex bootauto.bin
  56.  
  57. pfdisk.doc: pfdisk.man
  58.     nroff tmac.an pfdisk.man |col -bh >pfdisk.doc
  59.  
  60. clean:
  61.     rm -f *.o
  62.  
  63. Shar1.out: Head1.txt $(FILES1)
  64.     (cat Head1.txt ; shar $(FILES1)) > $@
  65. Shar2.out: Head2.txt $(FILES2)
  66.     (cat Head2.txt ; shar $(FILES2)) > $@
  67.  
  68. Dist.tar: HeadTar.txt $(FILES1) $(FILES2)
  69.     tar cf $@ HeadTar.txt $(FILES1) $(FILES2)
  70.