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

  1. # MetaWare High C/C++ example (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 = hc.exe
  8. LINKER = link386.exe
  9.  
  10. !ifdef DEBUG
  11. ICC_ADD = /Ti+
  12. CLNKDBG = /DE /MAP:full
  13. !else
  14. ICC_ADD = /Gs- /Gi /O /Oi-
  15. !endif
  16.  
  17. HCCLIBC = -I$(LIBCPATH)
  18. COPT = -c -O2 -Hpentium $(ADD_COPT) -Hon=Optimize_FP -Hoff=BEHAVED $(HCCLIBC) -Fo $@
  19. LIBS = ..\lib\hcd_omf+libcss+os2386
  20. CNAME = _hcc
  21. LINKOPT = /NOD /NOE $(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.