2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Jim Klimov
16 include ..
/..
/..
/make-rules
/shared-macros.mk
18 COMPONENT_NAME
= libcidr
19 COMPONENT_VERSION
= 1.2.3
20 COMPONENT_SUMMARY
= LibCIDR is a library to manipulate CIDR IP addresses
21 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
22 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.xz
23 COMPONENT_ARCHIVE_HASH
= \
24 sha256
:afbe266a9839775a21091b0e44daaf890a46ea4c2d3f5126b3048d82b9bfbbc4
25 COMPONENT_ARCHIVE_URL
= \
26 https
://www.over-yonder.net
/~fullermd
/projects
/$(COMPONENT_NAME
)/$(COMPONENT_ARCHIVE
)
27 COMPONENT_PROJECT_URL
= https
://www.over-yonder.net
/~fullermd
/projects
/$(COMPONENT_NAME
)
28 COMPONENT_FMRI
= library
/$(COMPONENT_NAME
)
29 COMPONENT_CLASSIFICATION
= System
/Libraries
30 COMPONENT_LICENSE
= BSD
31 COMPONENT_LICENSE_FILE
= LICENSE
33 include $(WS_TOP
)/make-rules
/prep.mk
34 include $(WS_TOP
)/make-rules
/justmake.mk
35 include $(WS_TOP
)/make-rules
/ips.mk
37 CXXFLAGS
.32=-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
38 CFLAGS
.32=-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
40 CXXFLAGS
+= $(CXXFLAGS.
$(BITS
))
41 CFLAGS
+= $(CFLAGS.
$(BITS
))
42 CFLAGS
+= -I
$(SOURCE_DIR
)/include
43 CFLAGS
+= -I
$(SOURCE_DIR
)/src
/include
45 COMPONENT_CUSTOM_ARGS
+= BITS
="$(BITS)"
46 COMPONENT_CUSTOM_ARGS
+= CC
="$(CC)"
47 COMPONENT_CUSTOM_ARGS
+= CXX
="$(CXX)"
48 COMPONENT_CUSTOM_ARGS
+= CPP
="$(CPP)"
49 COMPONENT_CUSTOM_ARGS
+= LD
="$(LD)"
50 COMPONENT_CUSTOM_ARGS
+= LN
="$(LN)"
51 COMPONENT_CUSTOM_ARGS
+= RM
="$(RM)"
52 COMPONENT_CUSTOM_ARGS
+= MV
="$(MV)"
53 COMPONENT_CUSTOM_ARGS
+= MKDIR
="$(MKDIR)"
54 COMPONENT_CUSTOM_ARGS
+= SED
="$(GSED)"
55 COMPONENT_CUSTOM_ARGS
+= INSTALL
="$(INSTALL)"
56 COMPONENT_CUSTOM_ARGS
+= CFLAGS
="$(CFLAGS)"
57 COMPONENT_CUSTOM_ARGS
+= CPPFLAGS
="$(CPPFLAGS)"
58 COMPONENT_CUSTOM_ARGS
+= CXXFLAGS
="$(CXXFLAGS)"
59 COMPONENT_CUSTOM_ARGS
+= LDFLAGS
="$(LDFLAGS)"
61 USRLIBDIR
.32 = $(USRLIBDIR
)
62 USRLIBDIR
.64 = $(USRLIBDIR64
)
63 USRBINDIR
.32 = $(USRBINDIR
)
64 USRBINDIR
.64 = $(USRBINDIR64
)
66 COMPONENT_CUSTOM_ARGS
+= PREFIX
="$(USRDIR)"
67 COMPONENT_CUSTOM_ARGS
+= CIDR_LIBDIR
="$(USRLIBDIR.$(BITS))"
68 COMPONENT_CUSTOM_ARGS
+= CIDR_BINDIR
="$(USRBINDIR.$(BITS))"
69 COMPONENT_CUSTOM_ARGS
+= CIDR_INCDIR
="$(USRINCDIR)"
70 COMPONENT_CUSTOM_ARGS
+= CIDR_MANDIR
="$(USRSHAREMANDIR)"
71 COMPONENT_CUSTOM_ARGS
+= CIDR_DOCDIR
="$(USRSHAREDIR)/$(COMPONENT_NAME)/docs"
72 COMPONENT_CUSTOM_ARGS
+= CIDR_EXDIR
="$(USRSHAREDIR)/$(COMPONENT_NAME)/examples"
74 COMPONENT_BUILD_ARGS
+= $(COMPONENT_CUSTOM_ARGS
)
75 COMPONENT_INSTALL_ARGS
+= $(COMPONENT_CUSTOM_ARGS
)
77 COMPONENT_PRE_BUILD_ACTION
= \
78 ( $(CLONEY
) $(SOURCE_DIR
) $(@D
) && \
80 .
/rmgmake.sh
&& .
/mkgmake.sh
)
82 build
: $(BUILD_32_and_64
)
84 install: $(INSTALL_32_and_64
)
86 test: $(TEST_32_and_64
)
88 # Auto-generated dependencies
89 REQUIRED_PACKAGES
+= system
/library