Under this target, only a basic library will be built.
add_definitions(-DCONFIG_DEBUG_PRINTF=0)
add_definitions(-DCONFIG_DEBUG_ASSERT=0)
#...
+elseif(LIB_ONLY)
+ add_definitions(-DCONFIG_DEBUG_PRINTF=0)
+ add_definitions(-DCONFIG_DEBUG_ASSERT=0)
+ add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
+ add_definitions(-DCONFIG_HAVE_OWN_ERRNO=1)
+ add_definitions(-DCONFIG_BLOCK_DEV_CACHE_SIZE=16)
else()
#Generic example target
set(BLOCKDEV_TYPE linux)
cd build_arm-sim && cmake -G"Unix Makefiles" \
$(COMMON_DEFINITIONS) \
-DCMAKE_TOOLCHAIN_FILE=../toolchain/arm-sim.cmake ..
-
-all: generic bf518 cortex-m3 cortex-m4 generic
+
+lib_only:
+ rm -R -f build_lib_only
+ mkdir build_lib_only
+ cd build_lib_only && cmake $(COMMON_DEFINITIONS) -DLIB_ONLY=TRUE ..
+
+all: generic bf518 cortex-m3 cortex-m4 lib_only
clean:
include_directories(.)
aux_source_directory(. LWEXT4_SRC)
add_library(lwext4 ${LWEXT4_SRC})
-add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} liblwext4.a)
-
+if (DEFINED SIZE)
+ add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} liblwext4.a)
+else()
+endif()