home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / perl4036.zip / os2 / Makefile < prev    next >
Makefile  |  1993-02-26  |  1KB  |  64 lines

  1. #
  2. # Makefile for compiling Perl under OS/2
  3. #
  4. # Needs emx 0.8f (gcc 2.3.3) or newer
  5. #
  6.  
  7. # Requires:
  8. # - GNU gdbm library, if missing, remove HAS_GDBM from config.h and -lgdbm
  9. # - GNU ufc library, if missing, remove HAS_CRYPT from config.h and -lufc
  10. #   (ufc = ultra fast crypt, part of GNU glibc 1.04 or above)
  11.  
  12. # Don't worry about the strange kind of linking, but
  13. # otherwise it wouldn't work (probably bug in ld).
  14.  
  15. SHELL   = cmd.exe
  16.  
  17. CC    = gcc -O -funsigned-char
  18. CFLAGS    = -DDEBUGGING
  19. LDFLAGS    = -s
  20. LIBS     = -lgdbm -lufc
  21. O    = .o
  22.  
  23. YACC    = bison
  24. YFLAGS    = -d
  25.  
  26. DEF     = os2/perl.def
  27. OBJ    = array$O cmd$O cons$O consarg$O doarg$O doio$O dolist$O \
  28.     dump$O eval$O form$O hash$O perl$O perly$O regcomp$O \
  29.     regexec$O stab$O str$O toke$O util$O os2$O suffix$O
  30.  
  31. .c$O:
  32.     $(CC) -c $(CFLAGS) $<
  33.  
  34. all: perl.exe perlglob.exe a2p.exe
  35.  
  36. perl.exe: $(OBJ)
  37.     $(CC) -o perl $(DEF) $(OBJ) $(LIBS)
  38.     emxbind -b -sq perl
  39.     rm -f perl
  40.  
  41. perlglob.exe: os2/glob.c
  42.     $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(DEF) os2/glob.c
  43.  
  44. a2p.exe:
  45.     cd x2p && $(MAKE)
  46.  
  47. os2$O: os2/os2.c
  48.     $(CC) -c $(CFLAGS) -I. os2/os2.c
  49.  
  50. suffix$O: os2/suffix.c
  51.     $(CC) -c $(CFLAGS) -I. os2/suffix.c
  52.  
  53. $(OBJ): config.h
  54. perl$O str$O cons$O toke$O: perly.h
  55.  
  56. config.h: os2/config.h
  57.     copy "os2\config.h" "config.h"
  58.  
  59. perly.c perly.h: perly.y
  60.     $(YACC) $(YFLAGS) -o $*.c $*.y
  61.  
  62. clean:
  63.     -rm -f perly.c perly.h config.h *$O >nul
  64.