appkit  1.5.1
RoadNarrows Robotics Application Kit
Makefile
Go to the documentation of this file.
1 ################################################################################
2 #
3 # ./Makefile
4 #
5 ifdef RNMAKE_DOXY
6 /*!
7 \file
8 
9 \brief The \h_appkit package top-level makefile.
10 
11 RN Make System Specific Makefile
12 
13 \pkgsynopsis
14 RoadNarrows Robotics Application Kit
15 
16 \pkgfile{Makefile}
17 
18 \pkgauthor{Robin Knight,robin.knight@roadnarrows.com}
19 
20 \pkgcopyright{2013-2018,RoadNarrows LLC,http://www.roadnarrows.com}
21 
22 \license{MIT}
23 
24 \EulaBegin
25 \EulaEnd
26 
27  * \cond RNMAKE_DOXY
28  */
29 endif
30 #
31 ################################################################################
32 
33 #------------------------------------------------------------------------------
34 # Required
35 
36 # Package Root Directory
37 RNMAKE_PKG_ROOT = .
38 
39 # Bootstrap package within RN Make System
40 include $(RNMAKE_PKG_ROOT)/make/Bootstrap.mk
41 
42 
43 #------------------------------------------------------------------------------
44 # Subdirectories
45 
46 RNMAKE_SUBDIRS = sw examples
47 
48 
49 #------------------------------------------------------------------------------
50 # Interface Headers
51 
52 #
53 # Distribution Header List Tags
54 #
55 # List of tags to lists of header files slated to be distributed and installed.
56 #
57 RNMAKE_DIST_HDRS = tinyxml librnr_appkit # librnr_cam librnr_win librnr_wingtk
58 
59 #
60 # Distribution Headers
61 #
62 # Format: <tag>.HDRS.H = [<subdirs>/]<hdr>.h ...
63 #
64 # Note: Any header file that requires distribution is expected to be in
65 # $(topdir)/include. Otherwise, is it really a deliverable header?
66 #
67 tinyxml.HDRS.H = \
68  rnr/tinyxml/tinystr.h \
69  rnr/tinyxml/tinyxml.h
70 
71 librnr_appkit.HDRS.H = \
72  rnr/appkit/CmdAddOns.h \
73  rnr/appkit/CmdArgDef.h \
74  rnr/appkit/CmdCore.h \
75  rnr/appkit/CmdDef.h \
76  rnr/appkit/CmdExtArg.h \
77  rnr/appkit/CmdFormDef.h \
78  rnr/appkit/CommandLine.h \
79  rnr/appkit/IOManip.h \
80  rnr/appkit/LogBook.h \
81  rnr/appkit/LogStream.h \
82  rnr/appkit/Random.h \
83  rnr/appkit/ReadLine.h \
84  rnr/appkit/RegEx.h \
85  rnr/appkit/Session.h \
86  rnr/appkit/State.h \
87  rnr/appkit/StateKb.h \
88  rnr/appkit/StateMach.h \
89  rnr/appkit/StringTheory.h \
90  rnr/appkit/Thread.h \
91  rnr/appkit/Time.h \
92  rnr/appkit/Token.h \
93  rnr/appkit/Xml.h
94 
95 librnr_cam.HDRS.H = \
96  rnr/appkit/Camera.h \
97  rnr/appkit/CameraCv.h \
98  rnr/appkit/CameraEcon32.h \
99  rnr/appkit/CameraEcon50.h \
100  rnr/appkit/CameraGst.h
101 
102 librnr_win.HDRS.H = \
103  rnr/appkit/SessionWin.h \
104  rnr/appkit/StateWin.h \
105  rnr/appkit/StateWinCamera.h \
106  rnr/appkit/Win.h \
107  rnr/appkit/WinCvIoI.h \
108  rnr/appkit/WinCvMouse.h \
109  rnr/appkit/WinLookFeel.h \
110  rnr/appkit/WinMenu.h \
111  rnr/appkit/WinOpenCv.h
112 
113 librnr_wingtk.HDRS.H = \
114  rnr/appkit/WinGtkMenu.h \
115  rnr/appkit/WinGtk.h
116 
117 
118 #------------------------------------------------------------------------------
119 # Documentation
120 
121 # Sub[Package] Doxygen Configuration File
122 RNMAKE_DOXY_CONF_FILE = $(RNMAKE_PKG_ROOT)/make/doxy.conf
123 
124 
125 #------------------------------------------------------------------------------
126 # Extras
127 
128 EXTRA_TGT_ALL_POST = all-post
129 
130 PKGDIR_SHARE := $(RNMAKE_PKG_ROOT)/share
131 PKGDIR_SHARE_IMAGES := $(RNMAKE_PKG_ROOT)/share/images
132 PKGDIR_SHARE_ICONS := $(RNMAKE_PKG_ROOT)/share/images/icons
133 
134 DISTDIR_SHARE_IMAGES := $(DISTDIR_SHARE)/images
135 DISTDIR_SHARE_ICONS := $(DISTDIR_SHARE)/images/icons
136 
137 PKG_SHARE_FILES := $(wildcard $(PKGDIR_SHARE)/*.xml) \
138  $(wildcard $(PKGDIR_SHARE_IMAGES)/*.png) \
139  $(wildcard $(PKGDIR_SHARE_IMAGES)/*.jpg) \
140  $(wildcard $(PKGDIR_SHARE_ICONS)/*.png) \
141  $(wildcard $(PKGDIR_SHARE_ICONS)/*.jpg)
142 DIST_SHARE_FILES := $(patsubst $(PKGDIR_SHARE)%,$(DISTDIR_SHARE)%,\
143  $(PKG_SHARE_FILES))
144 
145 SHARE_FILES = \
146  share/*.xml \
147  share/images/*.png \
148  share/images/*.jpg \
149  share/images/icons/*.png \
150  share/images/icons/*.jpg \
151 
152 .PHONY: all-post
153 all-post: show-banner cp-share-files
154 
155 #all-post: show-banner share-mkdirs $(DIST_SHARE_FILES)
156 
157 .PHONY: show-banner
158 show-banner:
159  $(call printDirBanner,,all-post)
160  @printf "Pre-install Configuration\n"
161 
162 .PHONY: cp-share-files
163 cp-share-files:
164  $(call printGoalDesc,$(@),Copying share files to $(DISTDIR_SHARE))
165  $(call copySrcDirRel,$(SHARE_FILES),$(DISTDIR_SHARE),share)
166 
167 
168 
169 .PHONY: share-mkdirs
170 share-mkdirs:
171  @test -d $(DISTDIR_SHARE_IMAGES) || $(MKDIR) $(DISTDIR_SHARE_IMAGES)
172  @test -d $(DISTDIR_SHARE_ICONS) || $(MKDIR) $(DISTDIR_SHARE_ICONS)
173 
174 # images png rule
175 $(DISTDIR_SHARE_IMAGES)/%.png : $(PKGDIR_SHARE_IMAGES)/%.png
176  @printf "\n"
177  @@printf "$(color_tgt_file) $(<)$(color_end)\n"
178  @$(CP) $(<) $(@)
179 
180 # images jpg rule
181 $(DISTDIR_SHARE_IMAGES)/%.jpg : $(PKGDIR_SHARE_IMAGES)/%.jpg
182  @printf "\n"
183  @@printf "$(color_tgt_file) $(<)$(color_end)\n"
184  @$(CP) $(<) $(@)
185 
186 # images png rule
187 $(DISTDIR_SHARE_ICONS)/%.png : $(PKGDIR_SHARE_ICONS)/%.png
188  @printf "\n"
189  @@printf "$(color_tgt_file) $(<)$(color_end)\n"
190  @$(CP) $(<) $(@)
191 
192 # images jpg rule
193 $(DISTDIR_SHARE_ICONS)/%.jpg : $(PKGDIR_SHARE_ICONS)/%.jpg
194  @printf "\n"
195  @@printf "$(color_tgt_file) $(<)$(color_end)\n"
196  @$(CP) $(<) $(@)
197 
198 
199 #------------------------------------------------------------------------------
200 # Include RNMAKE rules makefile(s)
201 
202 # include top-level rules
203 include $(RNMAKE_ROOT)/Rules.mk
204 
205 # include extras
206 include $(RNMAKE_ROOT)/Extras.mk
207 
208 
209 ifdef RNMAKE_DOXY
210 /*! \endcond RNMAKE_DOXY */
211 endif