home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / vos2-121.zip / v / examp / Makefile next >
Makefile  |  1998-12-20  |  2KB  |  83 lines

  1. #=======================================================================
  2. #  Makefile for example V program
  3. #  Copyright (C) 1995  Bruce E. Wampler
  4. #
  5. #  This program is part of the V C++ GUI Framework example programs.
  6. #
  7. #  This program is free software; you can redistribute it and/or modify
  8. #  it under the terms of the GNU General Public License as published by
  9. #  the Free Software Foundation; either version 2 of the License, or
  10. #  (at your option) any later version.
  11. #
  12. #  This program is distributed in the hope that it will be useful,
  13. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #  GNU General Public License for more details.
  16. #=======================================================================
  17.  
  18. CONFIG=../Config.mk
  19. include $(CONFIG)
  20.  
  21. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  22.  
  23. PROG=\
  24.     $(Bin)/proto
  25.  
  26. ifeq ($(Arch),os2)
  27. PROG    =     $(Bin)/proto.exe
  28. endif
  29.  
  30. EXOBJS=\
  31.     $(oDir)/protoapp.o \
  32.     $(oDir)/mydialog.o \
  33.     $(oDir)/mymodal.o \
  34.     $(oDir)/mycanvas.o \
  35.     $(oDir)/mycmdwin.o
  36.  
  37. ifeq ($(Arch),os2)
  38. EXOBJS += $(oDir)/vos2.res \
  39.       $(HOMEV)/srcos2/vos2.def 
  40. endif
  41.  
  42. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  43.  
  44. .PHONY: default all objs clean cleanobj cleanall
  45.  
  46. default: all
  47.  
  48. all:    $(PROG)
  49.  
  50. clean:
  51.     -rm -f $(CLEANEXTS)
  52.     -rm -f $(EXOBJS)
  53.  
  54. cleanall: clean
  55.     -rm -f $(PROG)
  56.  
  57. objs:    $(EXOBJS)
  58.  
  59. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  60.  
  61. $(PROG):    $(EXOBJS)
  62.     $(LD) -o $@ $(EXOBJS) $(LDFLAGS)
  63.  
  64. $(oDir)/mycanvas.o:    mycanvas.cpp v_defs.h mycanvas.h
  65.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  66.  
  67. $(oDir)/mydialog.o:    mydialog.cpp v_defs.h mydialog.h
  68.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  69.  
  70. $(oDir)/mymodal.o:    mymodal.cpp v_defs.h mymodal.h
  71.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  72.  
  73. $(oDir)/mycmdwin.o:    mycmdwin.cpp v_defs.h mycmdwin.h
  74.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  75.  
  76. $(oDir)/protoapp.o:    protoapp.cpp v_defs.h mydialog.h mymodal.h \
  77.     protoapp.h mycmdwin.h
  78.     $(CXX) -c $(CFLAGS) -o $@ $<
  79.  
  80. # For os/2 only - compiles resource file
  81. $(oDir)/vos2.res:   $(HOMEV)/srcos2/vos2.rc $(HOMEV)/srcos2/vApp.ico $(HOMEV)/srcos2/collate.bmp
  82.     $(RES) $< $@
  83.