summaryrefslogtreecommitdiff
path: root/package/cjson/cjson.mk
blob: 64baf47874c7239e14665ab419ab9b64f272d55a (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
30
31
32
33
################################################################################
#
# 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

define CJSON_CLEAN_CMDS
	rm -f $(@D)/libcJSON.so
endef

$(eval $(generic-package))