Changes to make Linux build with CA_INT flag specified. 29/129/16
authorJoseph Morrow <joseph.l.morrow@intel.com>
Tue, 3 Feb 2015 00:07:30 +0000 (19:07 -0500)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Tue, 3 Feb 2015 01:20:49 +0000 (01:20 +0000)
These changes also include some work to ensure better global cleanup
in makefiles. Some of this clean up work also overlaps with cleaning
Arduino outputs. This commit only affects makefile builds.

Change-Id: Idcfce740f1ec5766599a1f0aafb5e635647e7692
Signed-off-by: Joseph Morrow <joseph.l.morrow@intel.com>
Signed-off-by: Doug Hudson <douglas.hudson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/129
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sashi Penta <sashi.kumar.penta@intel.com>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/csdk/connectivity/build/Makefile
resource/csdk/connectivity/build/arduino/build.sh
resource/csdk/makefile
resource/csdk/stack/samples/linux/SimpleClientServer/makefile

index 261f50e..a7cbc33 100644 (file)
@@ -38,21 +38,21 @@ $(info *******************tizen Build !!******************)
 all:
        sh tizen/gbsbuild.sh $(TRANSPORT)
 
+clean:
+       sh tizen/gbsbuild.sh clean
+
 else ifeq ($(PLATFORM),arduinomega)
 $(info *********ArduinoMega Build!!**********)
 all:
        sh arduino/build.sh clean $(PLATFORM) $(TRANSPORT) $(ARDUINO_DIR) $(APPNAME)
        sh arduino/build.sh make $(PLATFORM) $(TRANSPORT) $(ARDUINO_DIR) $(APPNAME)
 
-clean: 
-       sh arduino/build.sh clean $(PLATFORM) $(TRANSPORT) $(ARDUINO_DIR) $(APPNAME)
-
 install:
        sh arduino/build.sh install $(PLATFORM) $(TRANSPORT) $(ARDUINO_DIR) $(APPNAME)
-       
+
+clean:
+       sh arduino/build.sh clean
 else
    $(info *********error**********)
    $(error Wrong value for PLATFORM !!)
 endif
-
-
index 3aa2b31..ffac7cf 100644 (file)
@@ -1,4 +1,11 @@
 #!/bin/sh
+if echo $1 | grep -q -i "clean"
+then
+cd ../lib/libcoap-4.1.1/
+make -f makefile_arduino.mak clean
+cd ../../build/arduino
+make clean
+else
 if echo $1 | grep -q -i "make"
 then
 cd ../lib/libcoap-4.1.1/
@@ -10,4 +17,5 @@ cd ../lib/libcoap-4.1.1/
 make $1 -f makefile_arduino.mak PLATFORM=$2 ARDUINO_DIR=$4
 cd ../../build/arduino/
 make $1 PLATFORM=$2 TRANSPORT=$3 ARDUINO_DIR=$4 APP_NAME=$5
-fi
\ No newline at end of file
+fi
+fi
index 60f3a5a..e195227 100644 (file)
@@ -42,7 +42,7 @@ ifeq ($(PLATFORM),linux)
     CC=gcc
     AR=ar
     RANLIB=ranlib
-    CFLAGS_PLATFORM = -DWITH_POSIX -std=c99
+    CFLAGS_PLATFORM = -DWITH_POSIX -std=gnu99
     PLATFORM_TYPE=linux
 else ifeq ($(PLATFORM),arduinomega)
     include local.properties
index 94ca9d4..73a890b 100644 (file)
@@ -67,12 +67,14 @@ INC_DIRS    += -I$(CJSON_INC)
 
 # TODO-CA Remove -fstack-protector-all before merging to master
 CC_FLAGS.debug   := -O0 -g3 -Wall -fstack-protector-all -ffunction-sections -fdata-sections -fno-exceptions \
-                        -std=c++0x -pedantic $(INC_DIRS) -L$(ROOT_DIR)/linux/$(BUILD) -DTB_LOG 
+                    -std=c++0x -pedantic $(INC_DIRS) -L$(ROOT_DIR)/linux/$(BUILD) -L$(CONNECTIVITY_DIR)/build/out \
+                    '-Wl,-rpath=../$(CONNECTIVITY_DIR)/build/out' -DTB_LOG
 # TODO-CA Remove -fstack-protector-all before merging to master
 CC_FLAGS.release := -Os -Wall -fstack-protector-all -fdata-sections -Wl,--gc-sections -Wl,-s -fno-exceptions \
-                        -std=c++0x $(INC_DIRS) -L$(ROOT_DIR)/linux/$(BUILD) -DTB_LOG 
+                    -std=c++0x $(INC_DIRS) -L$(ROOT_DIR)/linux/$(BUILD) -L$(CONNECTIVITY_DIR)/build/out \
+                    '-Wl,-rpath=../$(CONNECTIVITY_DIR)/build/out' -DTB_LOG
 
-LDLIBS         += -loctbstack -lpthread -L$(CONNECTIVITY_DIR)/build/out -lconnectivity_abstraction
+LDLIBS         += -loctbstack -lpthread -lconnectivity_abstraction
 CPPFLAGS       += $(CC_FLAGS.$(BUILD)) $(LDLIBS)
 
 CJSON_SOURCES          := $(CJSON_SRC)/cJSON.c