home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / LANGUAGES / p2c.lha / makefile < prev    next >
Makefile  |  1993-03-06  |  3KB  |  85 lines

  1. -bo
  2. ******************************************************************************
  3. **
  4. **     -- MakeFile
  5. **
  6.  
  7. SDIR = /wherever                # Directory where source files can be found
  8. ODIR = /R0                        # Directory where output files are to be kept
  9. LIB  = /DD/LIB                    # Directory where library files can be found
  10. DDIR = /DD/DEFS                    # Directory where .h files can be found
  11. RDIR = /H2/RELS/wherever        # Directory where .r files are to be kept
  12. TDIR = /R0                        # Directory where temp files are to be kept
  13.  
  14. CC        = gcc                                            # Use GCC
  15. CDEBUG    = -fomit-frame-pointer                            # Debug flags
  16. #CDEBUG    = -DDEBUG -g -W                                    # Debug flags
  17. CINCL    =                                                # Extra header file dir
  18. COPTS    =                                                 # Compiler options
  19. COPTMZ1    = -o68 -O -fstrength-reduce -fforce-mem            # Compiler optimization
  20. COPTMZ2 = -fcombine-regs -fdefer-pop                    # Compiler optimization
  21. COPTMZ    = $(COPTMZ1) $(COPTMZ2)                            # Compiler optimization
  22. #COPTMZ    =                                                # Compiler optimization
  23. CFLAGS    = $(CDEBUG) $(COPTS) $(COPTMZ) $(CINCL)            # All flags together
  24.  
  25. ASM        = r68                                            # Assembler program
  26. AFLAGS    = -q                                            # Assembler flags
  27.  
  28. LMODULE    = -e=1 -p=0555                                    # Module settings
  29. LOPTS    =                                                 # Link options
  30. LLIBS    = -L$(LIB)/GCC -L$(LIB)/USR                        # More lib dirs
  31. LFLAGS    = $(LOPTS)
  32.  
  33. P2C        = p2c                                            # Pascal preprocessor
  34. PFLAGS    = -v                                            # Pascal flags
  35.  
  36. STDLIBS    = -l=$(LIB)/GCC/gnulib.l -l=$(LIB)/clibn.l -l=$(LIB)/math.l -l=$(LIB)/usr.l
  37. CPPLIBS    = -l=$(LIB)/GCC/libgpp.l -l=$(LIB)/GCC/gpp.l    # C++ libraries
  38. CIO        = -l=$(LIB)/cio.l                                # Use CIO
  39. CGFX    = -l=$(LIB)/USR/cgfx.l                            # Graphic routines
  40. PLIB    = -l=$(LIB)/P2C/libp2c.l                        # Pascal (p2c)
  41. RAND    = -l=$(LIB)/USR/rand.l                            # Random numbers
  42. CURSES    = -l=$(LIB)/USR/effocurses.l                    # Curses
  43. TERMCAP = -l=$(LIB)/termlib.l                            # Termcap
  44. BLARSLIB= -l=$(LIB)/USR/blarslib.l                        # B.Larson Unix stuff
  45. OS9LIB    = -l=$(LIB)/USR/os9lib.l                        # OS9 Unix stuff
  46.  
  47. OFLAGS    = $(CPPLIBS)                                    # "Collect" (GPP) flags
  48.  
  49. *----------------------------------------------------------------------------*
  50.  
  51. maze:        maze.r
  52.             l68 $(LIB)/cstart.r $(RDIR)/$*.r $(CGFX) $(RAND) $(STDLIBS) \
  53.             -e=1 -p=0555 -o=$(ODIR)/$@
  54.  
  55. stformat:    stformat.r
  56.             l68 $(LIB)/cstart.r $(RDIR)/$*.r $(STDLIBS) \
  57.             -l=/dd/usr/dcmd.l -e=1 -p=0555 -o=$(ODIR)/$@
  58.  
  59. vt100:        vt100.r
  60.             l68 $(LIB)/cstart.r $(RDIR)/$*.r $(STDLIBS) \
  61.             -e=1 -p=0555 -o=$(ODIR)/$@
  62.  
  63. alias:        dummy.r
  64.             l68 $(RDIR)/dummy.r -o=$(ODIR)/$@ -l=$(LIB)/usr.l
  65.  
  66. cleantdir:    always
  67.             @dir $(TDIR) >-$(TDIR)/mydir
  68.             del $(TDIR)/*
  69.  
  70. *----------------------------------------------------------------------------*
  71.  
  72. .c.r:
  73.     $(CC) $*.c -c -o $(RDIR)/$*.r $(CFLAGS)
  74. .c.a:
  75.     $(CC) $*.c -c -o $(TDIR)/$*.a $(CFLAGS) -S
  76. .a.r:
  77.     r68 $*.a -o=$(RDIR)/$*.r  $(AFLAGS)
  78. .p.r:
  79.     $(P2C) $(PFLAGS) $*.p -o $(TDIR)/$*.c #16k
  80.     $(CC) $(TDIR)/$*.c -c -o $(RDIR)/$*.r $(CFLAGS)
  81.  
  82. vt100.r:    vt100.c
  83. vt100.a:    vt100.c
  84. dummy.r:    dummy.a
  85.