Advertisement
Guest User

config.makefile and custom.makefile

a guest
Aug 6th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 6.44 KB | None | 0 0
  1. CONFIG.MAKEFILE (CUSTOM.MAKEFILE at the bottom):
  2.  
  3. #########################################################
  4. # Common build definitions (CUSTOM)
  5. #########################################################
  6.  
  7. RELEASE_BUILD        = yes
  8. QUIET_BUILD          = yes
  9. VPSDK_PARALLEL_BUILD = no
  10.  
  11. #########################################################
  12. # System utility definitions (STATIC)
  13. #########################################################
  14. define CHECK_UNDEFINITION
  15.   ifdef $(1)
  16.     $$(warning ERROR : $(1) defined $(2))
  17.     ERROR=1
  18.   endif
  19. endef
  20.  
  21. define EXIT_IF_ERROR
  22.   ifeq "$$(ERROR)" "1"
  23.     $$(error There has been some errors)
  24.   endif
  25. endef
  26.  
  27.  
  28. #########################################################
  29. # Validity control (STATIC)
  30. #########################################################
  31.  
  32. ifdef PC_TARGET
  33.   $(eval $(call CHECK_UNDEFINITION,CONSOLE_TARGET,(should not be defined when PC_TARGET is defined)))
  34. endif
  35.  
  36. $(eval $(call EXIT_IF_ERROR))
  37.  
  38.  
  39. #########################################################
  40. # Common definitions (STATIC)
  41. #########################################################
  42.  
  43. ifeq "$(QUIET_BUILD)" "yes"
  44.   export MAKEFLAGS+=-s --no-print-directory
  45. endif
  46.  
  47. COMMON_DIR:=../Common
  48.  
  49. SDK_FLAGS:="NO_EXAMPLES=yes"
  50. SDK_FLAGS+="USE_SDK=yes"
  51. SDK_FLAGS+="QUIET_BUILD=$(QUIET_BUILD)"
  52. SDK_FLAGS+="RELEASE_BUILD=$(RELEASE_BUILD)"
  53. SDK_FLAGS+="SDK_VERSION=$(SDK_VERSION)"
  54.  
  55. ifeq ($(filter NO_COM=%,$(TMP_SDK_FLAGS)),)
  56.   SDK_FLAGS+="NO_COM=no"
  57. endif
  58.  
  59. #########################################################
  60. # PC_TARGET specific definitions (STATIC)
  61. #########################################################
  62. ifdef PC_TARGET
  63.   SDK_FLAGS+="NO_COM=no"
  64.  
  65.   ifeq ("$(IPHONE_MODE)","yes")
  66.     OS_DEFINE=GNU_LINUX
  67.   else
  68.    ifeq ("$(USE_LINUX)","yes")
  69.     OS_DEFINE=GNU_LINUX
  70.    else
  71.      TARGET:=$(TARGET).exe
  72.      OS_DEFINE=WINDOW
  73.     endif
  74.   endif
  75.  
  76.   GENERIC_CFLAGS+=-D_MOBILE
  77.  
  78.   ifeq ($(RECORD_RAW_VIDEO),yes)
  79.     GENERIC_CFLAGS+=-DRECORD_RAW_VIDEO
  80.   endif
  81.  
  82.   ifeq ($(RECORD_FFMPEG_VIDEO),yes)
  83.     GENERIC_CFLAGS+=-DRECORD_FFMPEG_VIDEO
  84.   endif
  85.  
  86.   ifeq ($(RECORD_ENCODED_VIDEO),yes)
  87.     GENERIC_CFLAGS+=-DRECORD_ENCODED_VIDEO
  88.   endif
  89.  
  90.   GENERIC_CFLAGS+=-D$(OS_DEFINE)
  91.   ifeq ("$(IPHONE_MODE)","yes")
  92.      ifeq ($(PLATFORM_NAME),iphoneos)
  93.         GENERIC_CFLAGS+=-DTARGET_OS_IPHONE
  94.      else
  95.         GENERIC_CFLAGS+=-DTARGET_IPHONE_SIMULATOR
  96.      endif
  97.   endif
  98.  
  99.   ifneq ("$(USE_MINGW32)","yes")
  100.     GENERIC_CFLAGS+=$(shell pkg-config --cflags gtk+-2.0)
  101.     GENERIC_LIBS+=$(shell pkg-config --libs gtk+-2.0)
  102.   endif
  103.  
  104.   ifeq ("$(USE_LINUX)","yes")
  105.      SDK_FLAGS+="USE_LINUX=yes"
  106.   else
  107.      SDK_FLAGS+="USE_LINUX=no"
  108.   endif
  109.  
  110.   SDK_FLAGS+="USE_ELINUX=no"
  111.  
  112.   ifeq ("$(IPHONE_MODE)","yes")
  113.     SDK_FLAGS+="USE_IPHONE=yes"
  114.     SDK_FLAGS+="FFMPEG_SUPPORT=no"
  115.     SDK_FLAGS+="ITTIAM_SUPPORT=yes"
  116.     SDK_FLAGS+="USE_VIDEO_TCP=yes"
  117.     SDK_FLAGS+="USE_VIDEO_HD=no"
  118.   else
  119.     SDK_FLAGS+="USE_IPHONE=no"
  120.   endif
  121.  
  122.   ifeq ("$(USE_NDS)","yes")
  123.      SDK_FLAGS+="USE_NDS=yes"
  124.      SDK_FLAGS+="NDS_CPU=ARM7"
  125.   else
  126.      SDK_FLAGS+="USE_NDS=no"
  127.   endif
  128.  
  129.   ifeq ("$(USE_ANDROID)","yes")
  130.      SDK_FLAGS+="USE_ANDROID=yes"
  131.      SDK_FLAGS+="TOOLCHAIN_VERSION=arm-linux-androideabi-4.4.3"
  132.      SDK_FLAGS+="NDK_PLATFORM_VERSION=android-8"
  133.      SDK_FLAGS+="FFMPEG_SUPPORT=yes"
  134.      SDK_FLAGS+="ITTIAM_SUPPORT=yes"
  135.      SDK_FLAGS+="USE_VIDEO_TCP=yes"
  136.      SDK_FLAGS+="USE_VIDEO_HD=no"
  137.   else
  138.      SDK_FLAGS+="USE_ANDROID=no"
  139.   endif
  140.  
  141.   ifeq ("$(USE_LINUX)","yes")
  142.      ifeq ("$(PROJECT)","ardrone")
  143.         SDK_FLAGS+="FFMPEG_SUPPORT=yes"
  144.         SDK_FLAGS+="ITTIAM_SUPPORT=no"
  145.         SDK_FLAGS+="USE_VIDEO_TCP=no"
  146.         SDK_FLAGS+="USE_VIDEO_HD=no"
  147.      else
  148.         SDK_FLAGS+="FFMPEG_SUPPORT=yes"
  149.         SDK_FLAGS+="ITTIAM_SUPPORT=no"
  150.         SDK_FLAGS+="USE_VIDEO_TCP=yes"
  151.         SDK_FLAGS+="USE_VIDEO_HD=no"
  152.      endif
  153.   endif
  154.  
  155.   ifeq ($(filter USE_BLUEZ=%,$(TMP_SDK_FLAGS)),)
  156.     SDK_FLAGS+="USE_BLUEZ=no"
  157.   endif
  158.  
  159.   SDK_FLAGS+="USE_VLIB=yes"
  160.   SDK_FLAGS+="USE_BONJOUR=no"
  161.   SDK_FLAGS+="USE_WIFI=yes"
  162.  
  163.   SDK_FLAGS+="USE_BROADCOM=no"
  164.   SDK_FLAGS+="USE_IWLIB=no"
  165.  
  166.   SDK_FLAGS+="FF_ARCH=Intel"
  167.  
  168.   SDK_FLAGS+="USE_PARROTOS_CORE=no"
  169.   SDK_FLAGS+="USE_PARROTOS_DRIVERS=no"
  170.   SDK_FLAGS+="USE_PARROTOS_DEVS=no"
  171.   SDK_FLAGS+="USE_PARROTOS_CODEC=no"
  172.  
  173.  
  174.   SDK_FLAGS+="USE_ARDRONELIB=yes"
  175.   SDK_FLAGS+="USE_ARDRONE_VISION=yes"
  176.   SDK_FLAGS+="USE_ARDRONE_POLARIS=no"
  177.   SDK_FLAGS+="USE_ARDRONE_VICON=no"
  178.   SDK_FLAGS+="USE_ARDRONE_TEST_BENCHS=no"
  179.   SDK_FLAGS+="USE_ARDRONE_CALIBRATION=no"
  180.  
  181. endif
  182.  
  183. export SDK_FLAGS
  184. export GENERIC_CFLAGS
  185. export VPSDK_PARALLEL_BUILD
  186.  
  187. CUSTOM.MAKEFILE:
  188. #########################################################
  189. # Common definitions (CUSTOM)
  190. #########################################################
  191. ifndef IPHONE_MODE
  192. IPHONE_MODE      = no
  193. endif
  194. ifndef MINGW32_MODE
  195. MINGW32_MODE         = no
  196. endif
  197. ifndef USE_NDS
  198. USE_NDS              = no
  199. endif
  200. ifndef USE_ANDROID
  201. USE_ANDROID          = no
  202. endif
  203. ifndef USE_LINUX
  204. USE_LINUX            = no
  205. endif
  206. ifndef PROJECT
  207. # set default to ardrone2 for video TCP com.
  208. PROJECT              = ardrone2
  209. endif
  210. MAJOR_VERSION        = 0
  211. MINOR_VERSION        = 0
  212. MODIF_VERSION        = 0
  213.  
  214. #########################################################
  215. # ARDroneTool options definitions
  216. #########################################################
  217. USE_ARDRONE_TOOL=yes
  218. USE_CHECK_WIFI_CONFIG=no
  219.  
  220. ################## Wifi Options ##################
  221. # Name of the network you want to join or create
  222. WIFI_NETWORK_NAME    = "ardronenetwork"
  223. WIFI_BROADCAST       = "192.168.1.255"
  224.  
  225. ################## Video Options ##################
  226. # Tells if we want to record video on pc side
  227. RECORD_ENCODED_VIDEO     = yes
  228. RECORD_RAW_VIDEO         = no
  229. RECORD_FFMPEG_VIDEO      = no
  230.  
  231. # Tells if we want to add vision data to video stream (in raw mode)
  232. # Vision data are saved into file only if we define RECORD_RAW_VIDEO too
  233. RECORD_VISION_DATA   = no
  234. # If the yuv mode is choosen then video is displayed & recorded in color
  235. # Otherwise only luminances are displayed & recorded
  236. VIDEO_YUV            = yes
  237.  
  238. #########################################################
  239. # Embedded definitions (CUSTOM)
  240. #########################################################
  241. WIFI_ARDRONE_IP      = "192.168.1.1"
  242.  
  243. #########################################################
  244. # Linux definitions (CUSTOM)
  245. #########################################################
  246. WIFI_MOBILE_IP       = "192.168.1.2"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement