Browse Source

Add dist target.

pull/1/head
gkostka 11 years ago
parent
commit
4c59f0194e
  1. 36
      Makefile
  2. 12
      src/CMakeLists.txt
  3. 36
      src/Makefile

36
Makefile

@ -1,36 +0,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

12
src/CMakeLists.txt

@ -31,4 +31,14 @@ add_executable(fileimage_demo ${GENERIC_SRC} ${FILEDEV_SRC})
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)

36
src/Makefile

@ -0,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
Loading…
Cancel
Save