home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / DMAKE37S.ZIP / DMAKE / MSDOS / CONFIG.MK < prev    next >
Encoding:
Makefile  |  1991-05-06  |  1.6 KB  |  64 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.  
  7. # Memory model to compile for
  8. # set to s - small, m - medium, c - compact, l - large
  9. # Need large model now, dmake has grown up :-)
  10. MODEL = l
  11.  
  12. STARTUPFILE    = $(OS)/startup.mk
  13.  
  14. CPPFLAGS     = $(CFLAGS)
  15. LDOBJS        = $(CSTARTUP) $(OBJDIR)/{$(<:f)}
  16. LDARGS        = @$(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:s,/,\\,:t"+\n")\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)
  34.  
  35. # Common MSDOS source files.
  36. # Define SWAP to anything but 'y' for the swap code to be excluded on making.
  37. # Swapping for DOS versions is enabled by default.
  38. SWAP *= y
  39. .IF $(SWAP) == y
  40.    SWP_SRC = find.c spawn.c
  41.    ASRC += exec.asm
  42. .ELSE
  43.    SWP_SRC = tee.c
  44. .END
  45.  
  46. OS_SRC += ruletab.c dirbrk.c runargv.c arlib.c _chdir.c switchar.c rmprq.c\
  47.         $(SWP_SRC)
  48. SRC += $(OS_SRC)
  49. .SETDIR=$(OS) : $(ASRC) $(OS_SRC)
  50.  
  51. # Provide our own %$O : %$S rule.
  52. %$O : %$S
  53.     $(AS) $(ASFLAGS) $(<:s,/,\,);
  54.     mv $(@:f) $(OBJDIR)
  55.  
  56. # Set source dirs so that we can find files named in this
  57. # config file.
  58. .SOURCE.h : $(OS)
  59.  
  60. # See if we modify anything in the lower levels.
  61. .IF $(OSRELEASE) != $(NULL)
  62.    .INCLUDE .IGNORE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
  63. .END
  64.