build: Fix clean_install and move static build test (github issue #33)

1) clean_install was not removing the trc_pkt_lister program it installed.

2) The statically linked trc_pkt_lister_s program - built to test static
linking is now removed from the default build process.

Will only be built as part of the dev build when using make -f makefile.dev

Signed-off-by: Mike Leach <mike.leach@linaro.org>
diff --git a/decoder/build/linux/makefile b/decoder/build/linux/makefile
index bf90758..5722e81 100644
--- a/decoder/build/linux/makefile
+++ b/decoder/build/linux/makefile
@@ -202,3 +202,4 @@
 	-rm    $(INSTALL_LIB_DIR)/lib$(LIB_BASE_NAME).*
 	-rm    $(INSTALL_LIB_DIR)/lib$(LIB_CAPI_NAME).*
 	-rm -r $(INSTALL_INCLUDE_DIR)/$(LIB_UAPI_INC_DIR)
+	-rm    $(INSTALL_BIN_DIR)/trc_pkt_lister
diff --git a/decoder/build/linux/makefile.dev b/decoder/build/linux/makefile.dev
index 5eb1ec9..aaaa983 100644
--- a/decoder/build/linux/makefile.dev
+++ b/decoder/build/linux/makefile.dev
@@ -63,5 +63,8 @@
 PLAT_DIR=linux$(BIT_VARIANT)/$(BUILD_VARIANT)
 endif
 
+# for dev env, enable static link build test
+export TEST_STATIC_LINKING=1
+
 # include the main makefile
 include makefile
diff --git a/decoder/tests/build/linux/trc_pkt_lister/makefile b/decoder/tests/build/linux/trc_pkt_lister/makefile
index 6327d3e..df0af0a 100644
--- a/decoder/tests/build/linux/trc_pkt_lister/makefile
+++ b/decoder/tests/build/linux/trc_pkt_lister/makefile
@@ -71,7 +71,10 @@
 	mkdir -p $(BUILD_DIR)
 
 .PHONY: copy_libs
-copy_libs: $(BIN_TEST_TARGET_DIR)/$(PROG) $(BIN_TEST_TARGET_DIR)/$(PROG_S) 
+ifdef TEST_STATIC_LINKING
+copy_libs: $(BIN_TEST_TARGET_DIR)/$(PROG_S) 
+endif
+copy_libs: $(BIN_TEST_TARGET_DIR)/$(PROG)
 	cp $(LIB_TARGET_DIR)/*.so* $(BIN_TEST_TARGET_DIR)/.
 
 
@@ -90,6 +93,9 @@
 .PHONY: clean
 clean :
 	-rm $(BIN_TEST_TARGET_DIR)/$(PROG) $(OBJECTS)
+ifdef TEST_STATIC_LINKING
+	-rm $(BIN_TEST_TARGET_DIR)/$(PROG_S)
+endif
 	-rm $(DEPS)
 	-rm $(BIN_TEST_TARGET_DIR)/*.so*
 	-rmdir $(BUILD_DIR)