summaryrefslogtreecommitdiffstats
path: root/package/cjson/cjson.mk
blob: 484cb50606c0c0f5d53f5bda4e4daab67c777b95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
################################################################################
#
# cjson
#
################################################################################

CJSON_VERSION         = 58
CJSON_SITE_METHOD     = svn
CJSON_SITE            = http://svn.code.sf.net/p/cjson/code
CJSON_INSTALL_STAGING = YES
CJSON_LICENSE         = MIT
CJSON_LICENSE_FILES   = LICENSE

define CJSON_BUILD_CMDS
	cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC -lm \
		cJSON.c -o libcJSON.so
endef

define CJSON_INSTALL_STAGING_CMDS
	$(INSTALL) -D $(@D)/cJSON.h $(STAGING_DIR)/usr/include/cJSON.h
	$(INSTALL) -D $(@D)/libcJSON.so $(STAGING_DIR)/usr/lib/libcJSON.so
endef

define CJSON_INSTALL_TARGET_CMDS
	$(INSTALL) -D $(@D)/cJSON.h $(TARGET_DIR)/usr/include/cJSON.h
	$(INSTALL) -D $(@D)/libcJSON.so $(TARGET_DIR)/usr/lib/libcJSON.so
endef

$(eval $(generic-package))
OpenPOWER on IntegriCloud