[FL-1162] Compile all files in applications directory (#432)
* applications: fix errors in test apps * applications.mk: add all source files from applications
This commit is contained in:
		
							parent
							
								
									26c4b20ac2
								
							
						
					
					
						commit
						317bfba024
					
				| @ -2,7 +2,9 @@ APP_DIR		= $(PROJECT_ROOT)/applications | |||||||
| LIB_DIR 	= $(PROJECT_ROOT)/lib | LIB_DIR 	= $(PROJECT_ROOT)/lib | ||||||
| 
 | 
 | ||||||
| CFLAGS		+= -I$(APP_DIR) | CFLAGS		+= -I$(APP_DIR) | ||||||
| C_SOURCES	+= $(APP_DIR)/applications.c | C_SOURCES   += $(shell find $(APP_DIR) -name *.c) | ||||||
|  | CPP_SOURCES += $(shell find $(APP_DIR) -name *.cpp) | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| # Use APP_* for autostart app
 | # Use APP_* for autostart app
 | ||||||
| # Use BUILD_* for add app to build
 | # Use BUILD_* for add app to build
 | ||||||
| @ -37,17 +39,12 @@ APP_NFC ?= 0 | |||||||
| ifeq ($(APP_NFC), 1) | ifeq ($(APP_NFC), 1) | ||||||
| APP_MENU	= 1 | APP_MENU	= 1 | ||||||
| CFLAGS		+= -DAPP_NFC | CFLAGS		+= -DAPP_NFC | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/nfc/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_DOLPHIN ?= 0 | APP_DOLPHIN ?= 0 | ||||||
| ifeq ($(APP_DOLPHIN), 1) | ifeq ($(APP_DOLPHIN), 1) | ||||||
| APP_MENU	= 1 | APP_MENU	= 1 | ||||||
| CFLAGS		+= -DAPP_DOLPHIN | CFLAGS		+= -DAPP_DOLPHIN | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/dolphin/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/dolphin/scenes/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/dolphin/scenes/assets/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/dolphin/passport/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_POWER ?= 0 | APP_POWER ?= 0 | ||||||
| @ -55,14 +52,12 @@ ifeq ($(APP_POWER), 1) | |||||||
| APP_GUI		= 1 | APP_GUI		= 1 | ||||||
| APP_CLI		= 1 | APP_CLI		= 1 | ||||||
| CFLAGS		+= -DAPP_POWER | CFLAGS		+= -DAPP_POWER | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/power/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_BT ?= 0 | APP_BT ?= 0 | ||||||
| ifeq ($(APP_BT), 1) | ifeq ($(APP_BT), 1) | ||||||
| APP_CLI		= 1 | APP_CLI		= 1 | ||||||
| CFLAGS		+= -DAPP_BT | CFLAGS		+= -DAPP_BT | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/bt/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_MENU ?= 0 | APP_MENU ?= 0 | ||||||
| @ -75,19 +70,11 @@ ifeq ($(BUILD_MENU), 1) | |||||||
| APP_INPUT	= 1 | APP_INPUT	= 1 | ||||||
| APP_GUI		= 1 | APP_GUI		= 1 | ||||||
| CFLAGS		+= -DBUILD_MENU | CFLAGS		+= -DBUILD_MENU | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/menu/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/app-loader/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_TEST	?= 0 | APP_TEST	?= 0 | ||||||
| ifeq ($(APP_TEST), 1) | ifeq ($(APP_TEST), 1) | ||||||
| CFLAGS		+= -DAPP_TEST | CFLAGS		+= -DAPP_TEST | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/furi_record_test.c |  | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/test_index.c |  | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/minunit_test.c |  | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/furi_valuemutex_test.c |  | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/furi_pubsub_test.c |  | ||||||
| C_SOURCES	+= $(APP_DIR)/tests/furi_memmgr_test.c |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_EXAMPLE_BLINK ?= 0 | APP_EXAMPLE_BLINK ?= 0 | ||||||
| @ -98,7 +85,6 @@ endif | |||||||
| BUILD_EXAMPLE_BLINK ?= 0 | BUILD_EXAMPLE_BLINK ?= 0 | ||||||
| ifeq ($(BUILD_EXAMPLE_BLINK), 1) | ifeq ($(BUILD_EXAMPLE_BLINK), 1) | ||||||
| CFLAGS		+= -DBUILD_EXAMPLE_BLINK | CFLAGS		+= -DBUILD_EXAMPLE_BLINK | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/blink.c |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| @ -110,7 +96,6 @@ endif | |||||||
| BUILD_EXAMPLE_UART_WRITE ?= 0 | BUILD_EXAMPLE_UART_WRITE ?= 0 | ||||||
| ifeq ($(BUILD_EXAMPLE_UART_WRITE), 1) | ifeq ($(BUILD_EXAMPLE_UART_WRITE), 1) | ||||||
| CFLAGS		+= -DBUILD_EXAMPLE_UART_WRITE | CFLAGS		+= -DBUILD_EXAMPLE_UART_WRITE | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/uart_write.c |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_EXAMPLE_IPC ?= 0 | APP_EXAMPLE_IPC ?= 0 | ||||||
| @ -121,7 +106,6 @@ endif | |||||||
| BUILD_EXAMPLE_IPC ?= 0 | BUILD_EXAMPLE_IPC ?= 0 | ||||||
| ifeq ($(BUILD_EXAMPLE_IPC), 1) | ifeq ($(BUILD_EXAMPLE_IPC), 1) | ||||||
| CFLAGS		+= -DBUILD_EXAMPLE_IPC | CFLAGS		+= -DBUILD_EXAMPLE_IPC | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/ipc.c |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_EXAMPLE_INPUT_DUMP ?= 0 | APP_EXAMPLE_INPUT_DUMP ?= 0 | ||||||
| @ -132,7 +116,6 @@ endif | |||||||
| BUILD_EXAMPLE_INPUT_DUMP ?= 0 | BUILD_EXAMPLE_INPUT_DUMP ?= 0 | ||||||
| ifeq ($(BUILD_EXAMPLE_INPUT_DUMP), 1) | ifeq ($(BUILD_EXAMPLE_INPUT_DUMP), 1) | ||||||
| CFLAGS		+= -DBUILD_EXAMPLE_INPUT_DUMP | CFLAGS		+= -DBUILD_EXAMPLE_INPUT_DUMP | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/input_dump.c |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| @ -144,13 +127,10 @@ endif | |||||||
| BUILD_EXAMPLE_QRCODE ?= 0 | BUILD_EXAMPLE_QRCODE ?= 0 | ||||||
| ifeq ($(BUILD_EXAMPLE_QRCODE), 1) | ifeq ($(BUILD_EXAMPLE_QRCODE), 1) | ||||||
| CFLAGS		+= -DBUILD_EXAMPLE_QRCODE | CFLAGS		+= -DBUILD_EXAMPLE_QRCODE | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/u8g2_qrcode.c |  | ||||||
| C_SOURCES	+= $(LIB_DIR)/qrcode/qrcode.c |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| ifeq ($(BUILD_SUBGHZ), 1) | ifeq ($(BUILD_SUBGHZ), 1) | ||||||
| CFLAGS		+= -DBUILD_SUBGHZ | CFLAGS		+= -DBUILD_SUBGHZ | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/subghz/*.c) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| APP_GUI = 1 | APP_GUI = 1 | ||||||
| APP_CLI = 1 | APP_CLI = 1 | ||||||
| @ -164,8 +144,6 @@ endif | |||||||
| BUILD_LF_RFID ?= 0 | BUILD_LF_RFID ?= 0 | ||||||
| ifeq ($(BUILD_LF_RFID), 1) | ifeq ($(BUILD_LF_RFID), 1) | ||||||
| CFLAGS		+= -DBUILD_LF_RFID | CFLAGS		+= -DBUILD_LF_RFID | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/lf-rfid/*.c) |  | ||||||
| CPP_SOURCES	+= $(wildcard $(APP_DIR)/lf-rfid/*.cpp) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| APP_GUI = 1 | APP_GUI = 1 | ||||||
| endif | endif | ||||||
| @ -178,8 +156,6 @@ endif | |||||||
| BUILD_IRDA ?= 0 | BUILD_IRDA ?= 0 | ||||||
| ifeq ($(BUILD_IRDA), 1) | ifeq ($(BUILD_IRDA), 1) | ||||||
| CFLAGS		+= -DBUILD_IRDA | CFLAGS		+= -DBUILD_IRDA | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/irda/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/irda/*/*.c) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| APP_GUI = 1 | APP_GUI = 1 | ||||||
| endif | endif | ||||||
| @ -192,7 +168,6 @@ endif | |||||||
| BUILD_SD_TEST ?= 0 | BUILD_SD_TEST ?= 0 | ||||||
| ifeq ($(BUILD_SD_TEST), 1) | ifeq ($(BUILD_SD_TEST), 1) | ||||||
| CFLAGS		+= -DBUILD_SD_TEST | CFLAGS		+= -DBUILD_SD_TEST | ||||||
| CPP_SOURCES	+= $(wildcard $(APP_DIR)/sd-card-test/*.cpp) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| APP_GUI = 1 | APP_GUI = 1 | ||||||
| APP_SD_FILESYSTEM = 1 | APP_SD_FILESYSTEM = 1 | ||||||
| @ -206,7 +181,6 @@ endif | |||||||
| BUILD_SPEAKER_DEMO ?= 0 | BUILD_SPEAKER_DEMO ?= 0 | ||||||
| ifeq ($(BUILD_SPEAKER_DEMO), 1) | ifeq ($(BUILD_SPEAKER_DEMO), 1) | ||||||
| CFLAGS		+= -DBUILD_SPEAKER_DEMO | CFLAGS		+= -DBUILD_SPEAKER_DEMO | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/coreglitch_demo_0/*.c) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| APP_GUI = 1 | APP_GUI = 1 | ||||||
| endif | endif | ||||||
| @ -214,7 +188,6 @@ endif | |||||||
| BUILD_VIBRO_DEMO ?= 0 | BUILD_VIBRO_DEMO ?= 0 | ||||||
| ifeq ($(BUILD_VIBRO_DEMO), 1) | ifeq ($(BUILD_VIBRO_DEMO), 1) | ||||||
| CFLAGS		+= -DBUILD_VIBRO_DEMO | CFLAGS		+= -DBUILD_VIBRO_DEMO | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/examples/vibro.c) |  | ||||||
| APP_INPUT = 1 | APP_INPUT = 1 | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| @ -226,7 +199,6 @@ endif | |||||||
| BUILD_KEYPAD_TEST ?= 0 | BUILD_KEYPAD_TEST ?= 0 | ||||||
| ifeq ($(BUILD_KEYPAD_TEST), 1) | ifeq ($(BUILD_KEYPAD_TEST), 1) | ||||||
| CFLAGS		+= -DBUILD_KEYPAD_TEST | CFLAGS		+= -DBUILD_KEYPAD_TEST | ||||||
| C_SOURCES	+= $(APP_DIR)/examples/keypad_test.c |  | ||||||
| BUILD_KEYPAD_TEST = 1 | BUILD_KEYPAD_TEST = 1 | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| @ -238,7 +210,6 @@ endif | |||||||
| BUILD_GPIO_DEMO ?= 0 | BUILD_GPIO_DEMO ?= 0 | ||||||
| ifeq ($(BUILD_GPIO_DEMO), 1) | ifeq ($(BUILD_GPIO_DEMO), 1) | ||||||
| CFLAGS		+= -DBUILD_GPIO_DEMO | CFLAGS		+= -DBUILD_GPIO_DEMO | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/gpio-tester/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_MUSIC_PLAYER ?= 0 | APP_MUSIC_PLAYER ?= 0 | ||||||
| @ -249,7 +220,6 @@ endif | |||||||
| BUILD_MUSIC_PLAYER ?= 0 | BUILD_MUSIC_PLAYER ?= 0 | ||||||
| ifeq ($(BUILD_MUSIC_PLAYER), 1) | ifeq ($(BUILD_MUSIC_PLAYER), 1) | ||||||
| CFLAGS		+= -DBUILD_MUSIC_PLAYER | CFLAGS		+= -DBUILD_MUSIC_PLAYER | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/music-player/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_FLOOPPER_BLOOPPER ?= 0 | APP_FLOOPPER_BLOOPPER ?= 0 | ||||||
| @ -260,7 +230,6 @@ endif | |||||||
| BUILD_FLOOPPER_BLOOPPER ?= 0 | BUILD_FLOOPPER_BLOOPPER ?= 0 | ||||||
| ifeq ($(BUILD_FLOOPPER_BLOOPPER), 1) | ifeq ($(BUILD_FLOOPPER_BLOOPPER), 1) | ||||||
| CFLAGS		+= -DBUILD_FLOOPPER_BLOOPPER | CFLAGS		+= -DBUILD_FLOOPPER_BLOOPPER | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/floopper-bloopper/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_IBUTTON ?= 0 | APP_IBUTTON ?= 0 | ||||||
| @ -271,8 +240,6 @@ endif | |||||||
| BUILD_IBUTTON ?= 0 | BUILD_IBUTTON ?= 0 | ||||||
| ifeq ($(BUILD_IBUTTON), 1) | ifeq ($(BUILD_IBUTTON), 1) | ||||||
| CFLAGS		+= -DBUILD_IBUTTON | CFLAGS		+= -DBUILD_IBUTTON | ||||||
| CPP_SOURCES	+= $(wildcard $(APP_DIR)/ibutton/*.cpp) |  | ||||||
| CPP_SOURCES	+= $(wildcard $(APP_DIR)/ibutton/*/*.cpp) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_GUI_TEST ?= 0 | APP_GUI_TEST ?= 0 | ||||||
| @ -283,7 +250,6 @@ endif | |||||||
| BUILD_GUI_TEST ?= 0 | BUILD_GUI_TEST ?= 0 | ||||||
| ifeq ($(BUILD_GUI_TEST), 1) | ifeq ($(BUILD_GUI_TEST), 1) | ||||||
| CFLAGS		+= -DBUILD_GUI_TEST | CFLAGS		+= -DBUILD_GUI_TEST | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/gui-test/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_SDNFC ?= 0 | APP_SDNFC ?= 0 | ||||||
| @ -294,33 +260,26 @@ endif | |||||||
| BUILD_SDNFC ?= 0 | BUILD_SDNFC ?= 0 | ||||||
| ifeq ($(BUILD_SDNFC), 1) | ifeq ($(BUILD_SDNFC), 1) | ||||||
| CFLAGS		+= -DBUILD_SDNFC | CFLAGS		+= -DBUILD_SDNFC | ||||||
| CPP_SOURCES	+= $(APP_DIR)/sdnfc/sdnfc.cpp |  | ||||||
| endif | endif | ||||||
| # device drivers
 | # device drivers
 | ||||||
| 
 | 
 | ||||||
| APP_GUI	?= 0 | APP_GUI	?= 0 | ||||||
| ifeq ($(APP_GUI), 1) | ifeq ($(APP_GUI), 1) | ||||||
| CFLAGS		+= -DAPP_GUI | CFLAGS		+= -DAPP_GUI | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/gui/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/gui/modules/*.c) |  | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/backlight-control/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_SD_FILESYSTEM	?= 0 | APP_SD_FILESYSTEM	?= 0 | ||||||
| ifeq ($(APP_SD_FILESYSTEM), 1) | ifeq ($(APP_SD_FILESYSTEM), 1) | ||||||
| CFLAGS		+= -DAPP_SD_FILESYSTEM | CFLAGS		+= -DAPP_SD_FILESYSTEM | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/sd-filesystem/*.c) |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_INPUT	?= 0 | APP_INPUT	?= 0 | ||||||
| ifeq ($(APP_INPUT), 1) | ifeq ($(APP_INPUT), 1) | ||||||
| CFLAGS		+= -DAPP_INPUT | CFLAGS		+= -DAPP_INPUT | ||||||
| C_SOURCES	+= $(APP_DIR)/input/input.c |  | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| APP_CLI ?= 0 | APP_CLI ?= 0 | ||||||
| ifeq ($(APP_CLI), 1) | ifeq ($(APP_CLI), 1) | ||||||
| APP_GUI		= 1 | APP_GUI		= 1 | ||||||
| CFLAGS		+= -DAPP_CLI | CFLAGS		+= -DAPP_CLI | ||||||
| C_SOURCES	+= $(wildcard $(APP_DIR)/cli/*.c) |  | ||||||
| endif | endif | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| #include <furi.h> | #include <furi.h> | ||||||
| #include <api-hal.h> | #include <api-hal.h> | ||||||
| #include <input.h> | #include <input/input.h> | ||||||
| 
 | 
 | ||||||
| static void event_cb(const void* value, void* ctx) { | static void event_cb(const void* value, void* ctx) { | ||||||
|     const InputEvent* event = value; |     const InputEvent* event = value; | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| #include <stdio.h> | #include <stdio.h> | ||||||
| #include <string.h> | #include <string.h> | ||||||
| #include <furi.h> | #include <furi.h> | ||||||
|  | #include "api-hal-delay.h" | ||||||
| 
 | 
 | ||||||
| #include "minunit.h" | #include "minunit.h" | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 gornekich
						gornekich