ref: 4c59f0194e5a6de2131f974e1174ceafe18dbc48
parent: 8cdd8add659ccbcaccf45694eaca14bd3094fa1d
author: gkostka <[email protected]>
date: Thu Oct 10 14:38:12 EDT 2013
Add dist target.
--- a/Makefile
+++ /dev/null
@@ -1,36 +1,0 @@
-
-all: generic bf518 cortex-m3 cortex-m4 generic
-
-bf518:
- rm -R -f bf518
- mkdir bf518
- cd bf518 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/bf518.cmake ../src
- cd bf518 && make
-
-cortex-m3:
- rm -R -f cortex-m3
- mkdir cortex-m3
- cd cortex-m3 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/cortex-m3.cmake ../src
- cd cortex-m3 && make
-
-cortex-m4:
- rm -R -f cortex-m4
- mkdir cortex-m4
- cd cortex-m4 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/cortex-m4.cmake ../src
- cd cortex-m4 && make
-
-
-generic:
- rm -R -f generic
- mkdir generic
- cd generic && cmake -G"Unix Makefiles" ../src
- cd generic&& make
-
-
-clean:
- rm -R -f bf518
- rm -R -f cortex-m3
- rm -R -f cortex-m4
- rm -R -f generic
-
-
\ No newline at end of file
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,4 +31,14 @@
target_link_libraries(fileimage_demo lwext4)
add_custom_target(size ALL DEPENDS lwext4 COMMAND size -B liblwext4.a)
endif()
-
+
+#DISTRIBUTION
+set(CPACK_PACKAGE_VERSION_MAJOR "0")
+set(CPACK_PACKAGE_VERSION_MINOR "1")
+set(CPACK_PACKAGE_VERSION_PATCH "0")
+set(CPACK_SOURCE_GENERATOR "TBZ2")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME
+ "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+include(CPack)
+
+add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
--- /dev/null
+++ b/src/Makefile
@@ -1,0 +1,36 @@
+
+all: generic bf518 cortex-m3 cortex-m4 generic
+
+bf518:
+ rm -R -f ../bf518
+ cd .. && mkdir bf518
+ cd ../bf518 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/bf518.cmake ../src
+ cd ../bf518 && make
+
+cortex-m3:
+ rm -R -f ../cortex-m3
+ cd .. && mkdir cortex-m3
+ cd ../cortex-m3 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/cortex-m3.cmake ../src
+ cd ../cortex-m3 && make
+
+cortex-m4:
+ rm -R -f ../cortex-m4
+ cd .. && mkdir cortex-m4
+ cd ../cortex-m4 && cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../src/toolchain/cortex-m4.cmake ../src
+ cd ../cortex-m4 && make
+
+
+generic:
+ rm -R -f ../generic
+ cd .. && mkdir generic
+ cd ../generic && cmake -G"Unix Makefiles" ../src
+ cd ../generic && make
+
+
+clean:
+ rm -R -f ../bf518
+ rm -R -f ../cortex-m3
+ rm -R -f ../cortex-m4
+ rm -R -f ../generic
+
+
\ No newline at end of file