home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / msdos / config.mk < prev    next >
Makefile  |  1994-10-23  |  2KB  |  71 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        = $(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: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. # Note: swapping is handled specially for ZTC in msdos/ztcdos/config.mk.
  39. SWAP *= y
  40. .IF $(OSRELEASE) != ztcdos
  41.    .IF $(SWAP) == y
  42.       SWP_SRC = find.c spawn.c
  43.       ASRC += exec.asm
  44.    .ELSE
  45.       SWP_SRC = tee.c
  46.    .END
  47. .ELSE
  48.    SWP_SRC = tee.c
  49. .END
  50.  
  51. OS_SRC += ruletab.c dirbrk.c runargv.c arlib.c _chdir.c switchar.c rmprq.c\
  52.         $(SWP_SRC) dirlib.c
  53. UNIXSRC := dcache.c
  54. SRC += $(OS_SRC) $(UNIXSRC)
  55. .SETDIR=$(OS) : $(ASRC) $(OS_SRC)
  56. .SETDIR=unix  : $(UNIXSRC)
  57.  
  58. # Provide our own %$O : %$S rule.
  59. %$O : %$S
  60.     $(AS) $(ASFLAGS) $(<:s,/,\,);
  61.     mv $(@:f) $(OBJDIR)
  62.  
  63. # Set source dirs so that we can find files named in this
  64. # config file.
  65. .SOURCE.h : $(OS)
  66.  
  67. # See if we modify anything in the lower levels.
  68. .IF $(OSRELEASE) != $(NULL)
  69.    .INCLUDE : $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)config.mk
  70. .END
  71.