home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / libcvers.zip / article_appendix / example / makefile.wcr < prev    next >
Makefile  |  2002-03-18  |  723b  |  35 lines

  1. # Watcom example - "_Optlink-like" mode (use NMAKE)
  2.  
  3. !ifndef LIBCPATH
  4. !error Add LIBCPATH to NMAKE command line, e.g. LIBCPATH=x:\toolkit\h\libc
  5. !endif
  6.  
  7. CC = wcc386.exe
  8. LINKER = link386.exe
  9.  
  10. !ifdef DEBUG
  11. WCC_ADD = -d2 -en
  12. CLNKDBG = /DE /MAP:full
  13. !else
  14. WCC_ADD = -os
  15. !endif
  16.  
  17. WCCLIBC = -i=$(LIBCPATH) -D__EXTENDED__ -zl -D_LNK_CONV=_System
  18. COPT = -fpi87 -5r -DWATCOM_FIX -fo=$@ -s -i=. $(WCCDBG) $(WCCLIBC) -ze
  19. LIBS = ..\lib\owatcomr+libcss+os2386
  20. CNAME = _wcr
  21. LINKOPT = $(CLNKDBG)
  22.  
  23. all: test$(CNAME).exe
  24.  
  25. test$(CNAME).exe: test.obj
  26.  $(LINKER) $(LINKOPT) $**,$@,$(@B).map,$(LIBS),test.def;
  27. !ifdef DEBUG
  28.  mapsym $(@B).map
  29. !else
  30.  lxlite /cs /mf3 /bdx- /zs $@
  31. !endif
  32.  
  33. .c.obj:
  34.  $(CC) $(COPT) $<
  35.