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

  1. #=======================================================================
  2. #  Makefile for V Shell App Generator 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. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  22.  
  23.  
  24. ifeq ($(TOOLKIT),Motif)
  25. PROG    =    $(Bin)/vgenm
  26. else
  27. PROG    =    $(Bin)/vgen
  28. endif
  29. ifeq ($(Arch),os2)
  30. PROG    =     $(Bin)/vgen.exe
  31. endif
  32.  
  33. ifeq ($(Arch),linux)
  34. CFLAGS    +=    -DLINUX
  35. endif
  36. ifeq ($(Arch),linuxelf)
  37. CFLAGS    +=    -DLINUX
  38. endif
  39. ifeq ($(Arch),gnuwin32)
  40. CFLAGS    +=    -DGNUWIN32
  41. endif
  42.  
  43. EXOBJS=\
  44.     $(oDir)/vgapp.o \
  45.     $(oDir)/vgcmdw.o \
  46.     $(oDir)/vgcode.o \
  47.     $(oDir)/vgmdlg.o \
  48.     $(oDir)/vgdlmdlg.o \
  49.     $(oDir)/vgcnv.o
  50.  
  51. ifeq ($(Arch),gnuwin32)
  52. EXOBJS += $(oDir)/vgrc.o
  53. endif
  54.  
  55. ifeq ($(Arch),os2)
  56. EXOBJS += $(oDir)/vos2.res \
  57.       $(HOMEV)/srcos2/vos2.def 
  58. endif
  59.  
  60. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  61.  
  62. .PHONY: default all objs clean cleanobj cleanall
  63.  
  64. default: all
  65.  
  66. all:    $(PROG)
  67.  
  68. clean:
  69.     -rm -f $(CLEANEXTS)
  70.     -rm -f $(EXOBJS)
  71.  
  72. cleanall: clean
  73.     -rm -f $(PROG)
  74.  
  75. objs:    $(EXOBJS)
  76.  
  77. #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  78.  
  79. $(PROG):    $(EXOBJS)
  80.     $(LD) -o $@ $(EXOBJS) $(LDFLAGS)
  81.  
  82. # For gnuwin32 only - adds icons to .exe file
  83.  
  84. $(oDir)/vgrc.o:    vgen.rc vgen.ico vwindow.ico
  85.     $(RES) vgen.rc $(oDir)/vgrc.o
  86.  
  87. $(oDir)/vgcnv.o:    vgcnv.cpp v_defs.h vgcnv.h vgdefs.h
  88.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  89.  
  90. $(oDir)/vgcode.o:    vgcode.cpp v_defs.h vgcode.h vgdefs.h
  91.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  92.  
  93. $(oDir)/vgmdlg.o:    vgmdlg.cpp v_defs.h vgmdlg.h vgdefs.h
  94.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  95.  
  96. $(oDir)/vgdlmdlg.o:    vgdlmdlg.cpp v_defs.h vgdlmdlg.h vgdefs.h
  97.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  98.  
  99. $(oDir)/vgcmdw.o:    vgcmdw.cpp v_defs.h vgcmdw.h vgdefs.h
  100.     $(CXX) -c $(CFLAGS) -o $@ $<                     
  101.  
  102. $(oDir)/vgapp.o:    vgapp.cpp v_defs.h vgapp.h vgcmdw.h vgdefs.h
  103.     $(CXX) -c $(CFLAGS) -o $@ $<
  104.  
  105. # For os/2 only - compiles resource file
  106. $(oDir)/vos2.res:   $(HOMEV)/srcos2/vos2.rc $(HOMEV)/srcos2/vApp.ico $(HOMEV)/srcos2/collate.bmp
  107.     $(RES) $< $@
  108.  
  109.  
  110.  
  111.