librnr  1.14.5
RoadNarrows Robotics Common Library 1
Makefile
Go to the documentation of this file.
1 ################################################################################
2 #
3 # ./Makefile
4 #
5 ifdef RNMAKE_DOXY
6 /*!
7 \file
8 
9 \brief Top-level \h_librnr makefile.
10 
11 An rnmake system package specific makefile.
12 
13 \pkgsynopsis
14 RoadNarrows Robotics Common Library 1
15 
16 \pkgfile{Makefile}
17 
18 \pkgauthor{Robin Knight,robin.knight@roadnarrows.com}
19 
20 \pkgcopyright{2005-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 = examples
47 
48 #------------------------------------------------------------------------------
49 # librnr
50 
51 # Distribution Static Libraries
52 RNMAKE_DIST_STLIBS = rnr
53 
54 # Distribution Shared Libraries
55 RNMAKE_DIST_SHLIBS = rnr
56 
57 # Source Files
58 rnr.SRC.C = assoc.c \
59  char.c \
60  checksum.c \
61  color.c \
62  config.c \
63  dlistvoid.c \
64  hash.c \
65  log.c \
66  new.c \
67  opts.c \
68  path.c \
69  shm.c \
70  simplebuf.c\
71  sock.c \
72  sockset.c \
73  units.c \
74  uri.c \
75  win.c
76 
77 # library target subdirectory
78 rnr.SUBDIR = rnr
79 
80 # library dependencies
81 rnr.LIBS = pthread rt
82 
83 
84 #------------------------------------------------------------------------------
85 # Distribution Headers
86 
87 #
88 # Distribution Header List Tags
89 #
90 # List of tags to lists of header files slated to be distributed and installed.
91 #
92 RNMAKE_DIST_HDRS = rnr
93 
94 #
95 # Distribution Headers
96 #
97 # Format: <tag>.HDRS.H = [<subdirs>/]<hdr>.h ...
98 #
99 rnr.HDRS.H = rnr/assoc.h \
100  rnr/char.h \
101  rnr/checksum.h \
102  rnr/color.h \
103  rnr/config.h \
104  rnr/dlist.h \
105  rnr/dliststr.h \
106  rnr/dlistvoid.h \
107  rnr/hash.h \
108  rnr/install.h \
109  rnr/log.h \
110  rnr/new.h \
111  rnr/opts.h \
112  rnr/path.h \
113  rnr/pkg.h \
114  rnr/rnrconfig.h \
115  rnr/shm.h \
116  rnr/simplebuf.h \
117  rnr/sock.h \
118  rnr/sockset.h \
119  rnr/units.h \
120  rnr/uri.h
121 
122 #------------------------------------------------------------------------------
123 # Documentation
124 
125 # Doxygen Configuration File
126 RNMAKE_DOXY_CONF_FILE = $(RNMAKE_PKG_ROOT)/make/doxy.conf
127 
128 #------------------------------------------------------------------------------
129 # Extras
130 
131 # Subpackage C PreProcessor Flags
132 EXTRA_CPPFLAGS = -DLOG -DLOGMOD="\"librnr\""
133 
134 # Uncomment to discover specific compiler warnings switches
135 #EXTRA_CFLAGS = -fdiagnostics-show-option
136 
137 EXTRA_TGT_ALL_POST = all-post
138 
139 ETC_FILES = share/etc/*.xml \
140  share/etc/ld.so.conf.d/*.conf \
141  etc/udev/rules.d/*
142 
143 LIB_FILES = share/lib/cmake/rnr/rnr-sdk-config.cmake
144 
145 PKGDIR_SHARE := $(RNMAKE_PKG_ROOT)/share
146 
147 # post 'all' make target
148 .PHONY: all-post
149 all-post: show-banner cp-etc-files cp-lib-files cp-share-files
150 
151 .PHONY: show-banner
152 show-banner:
153  $(call printDirBanner,,all-post)
154  @printf "Pre-install Configuration\n"
155 
156 .PHONY: cp-etc-files
157 cp-etc-files:
158  $(call printGoalDesc,$(@),Copying etc files to $(DISTDIR_ETC))
159  $(call copySrcDirRel,$(ETC_FILES),$(DISTDIR_ETC))
160 
161 .PHONY: cp-lib-files
162 cp-lib-files:
163  $(call printGoalDesc,$(@),Copying extra lib files to $(DISTDIR_LIB))
164  $(call copySrcDirRel,$(LIB_FILES),$(DISTDIR_LIB))
165 
166 .PHONY: cp-share-files
167 cp-share-files:
168  $(call printGoalDesc,$(@),Copying share directory to $(DISTDIR_SHARE))
169  @$(CP_R) $(PKGDIR_SHARE)/* $(DISTDIR_SHARE)
170  @find $(DISTDIR_SHARE) -name '*.svn' -print | xargs rm -fr
171 
172 
173 #------------------------------------------------------------------------------
174 # Include RNMAKE rules makefile(s)
175 
176 # include top-level rules
177 include $(RNMAKE_ROOT)/Rules.mk
178 
179 # include extras (must include after top-level)
180 include $(RNMAKE_ROOT)/Extras.mk
181 
182 
183 ifdef RNMAKE_DOXY
184 /*! \endcond RNMAKE_DOXY */
185 endif