home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / os2 / config.mk < prev    next >
Makefile  |  1994-10-23  |  2KB  |  55 lines

  1. # This is an OS specific configuration file
  2. #    It assumes that OBJDIR, TARGET and DEBUG are previously defined.
  3. #    It defines    CFLAGS, LDARGS, CPPFLAGS, STARTUPFILE, LDOBJS
  4. #    It augments    SRC, OBJDIR, TARGET, CFLAGS, LDLIBS
  5. #
  6. OSRELEASE *= mscdos
  7. # Memory model to compile for
  8. # set to s - small, m - medium, c - compact, l - large
  9. # Use only large model now.
  10. MODEL = l
  11.  
  12. STARTUPFILE    = $(OS)/startup.mk
  13.  
  14. CPPFLAGS     = $(CFLAGS)
  15. LDOBJS        = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
  16. LDARGS        = $(LDHEAD) @$(LDTMPOBJ),$(TARGET),NUL.MAP,,$(LDTAIL)
  17. LDTAIL        = $(_libs)$(LDFLAGS:s/ //)
  18. _libs           = $(!null,$(LDLIBS) ,@$(LDTMPLIB))
  19. LDTMPOBJ    = $(mktmp,,$(DIVFILE) $(LDOBJS:s,/,\\,:t"+\n")\n)
  20. LDTMPLIB    = $(mktmp,,$(DIVFILE) $(LDLIBS)\n)
  21.  
  22. # Debug flags
  23. DB_CFLAGS    = -DDBUG
  24. DB_LDFLAGS    =
  25. DB_LDLIBS    =
  26.  
  27. # NO Debug flags
  28. NDB_CFLAGS    = 
  29. NDB_LDFLAGS    =
  30. NDB_LDLIBS      =
  31.  
  32. # Local configuration modifications for CFLAGS.
  33. CFLAGS         += -I$(OS) -DOS2
  34.  
  35. # OS2 does not have a swap version. The operating system will
  36. # handle all swapping.
  37. # To save copying unchanged files in from elsewhere, I shall use them in situ.
  38. OS_SRC  += ruletab.c runargv.c _chdir.c switchar.c
  39. DOS_SRC = dirbrk.c arlib.c
  40. UNIX_SRC = rmprq.c
  41.  
  42. SRC += $(OS_SRC) $(DOS_SRC) $(UNIX_SRC)
  43. .SETDIR=$(OS) : $(ASRC) $(OS_SRC)
  44. .SETDIR=msdos : $(DOS_SRC)
  45. .SETDIR=unix : $(UNIX_SRC)
  46.  
  47. # Set source dirs so that we can find files named in this
  48. # config file.
  49. .SOURCE.h : $(OS)
  50.  
  51. # See if we modify anything in the lower levels.
  52. .IF $(OSRELEASE) != $(NULL)
  53.    .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
  54. .END
  55.