summaryrefslogtreecommitdiff
path: root/Makefile
blob: 3e58e3a7c11a8c12200f3473ac7d5bd8365a4b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FLASHER ?= jlink
BOARD ?= BOARD_PCA10028

#TARGET_CHIP := NRF51822_QFAA_CA
#TARGET_CHIP := NRF51422_QFAC_AB
# nrf51442 - qfac
#DEVICE_VARIANT := xxac
USE_SOFTDEVICE = S110

ifeq ($(BOARD),BOARD_PCA10028)
TARGET_CHIP := NRF51422_QFAC_AB
DEVICE_VARIANT := xxac
else ifeq ($(BOARD),BOARD_PCA10031)
TARGET_CHIP := NRF51422_QFAC_AB
DEVICE_VARIANT := xxac
endif

CFLAGS += -DBLE_STACK_SUPPORT_REQD
CFLAGS += -DSOFTDEVICE_PRESENT

CFLAGS += -D$(USE_SOFTDEVICE)

debug: CFLAGS += -DSM_DEBUG
debug: CFLAGS += -DENABLE_DEBUG_LOG_SUPPORT
debug: CFLAGS += -DDM_DISABLE_LOGS

C_SOURCE_FILES += main.c
C_SOURCE_FILES += phone_remote.c
C_SOURCE_FILES += LiquidCrystal.c

C_SOURCE_FILES += nrf_assert.c
C_SOURCE_FILES += nrf_delay.c
C_SOURCE_FILES += retarget.c
C_SOURCE_FILES += ble_sensorsim.c
C_SOURCE_FILES += bsp.c
C_SOURCE_FILES += app_button.c
C_SOURCE_FILES += app_error.c
C_SOURCE_FILES += app_timer.c
C_SOURCE_FILES += app_gpiote.c
#C_SOURCE_FILES += app_scheduler.c
C_SOURCE_FILES += app_trace.c
C_SOURCE_FILES += app_fifo.c
C_SOURCE_FILES += app_uart_fifo.c
C_SOURCE_FILES += pstorage.c
#C_SOURCE_FILES += ble_hrs.c
#C_SOURCE_FILES += ble_dis.c
#C_SOURCE_FILES += ble_bas.c
C_SOURCE_FILES += ble_conn_params.c
C_SOURCE_FILES += ble_advdata.c
C_SOURCE_FILES += ble_srv_common.c
C_SOURCE_FILES += device_manager_peripheral.c
C_SOURCE_FILES += softdevice_handler.c

PROJECT_NAME := phone_remote_nrf51
SDK_SOURCE_PATH = $(SDK_PATH)/components
SOFTDEVICE_HEX_PATH = $(HOME)/opt/nrf-sdk/s110/s110_nrf51822_7.1.0_softdevice.hex

all: debug

include ~/.nrf51822-posix-build-scripts.mk
include $(TEMPLATE_PATH)/Makefile.common