forked from FarmBot/farmbot_os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (25 loc) · 1.07 KB
/
Makefile
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
ALL :=
CLEAN :=
ifeq ($(ERL_EI_INCLUDE_DIR),)
$(warning ERL_EI_INCLUDE_DIR not set. Invoke via mix)
else
ALL += fbos_build_calendar_nif
CLEAN += fbos_clean_build_calendar_nif
endif
ifeq ($(SKIP_ARDUINO_BUILD),)
ALL += fbos_arduino_firmware
CLEAN += fbos_clean_arduino_firmware
else
$(warning SKIP_ARDUINO_BUILD is set. No arduino assets will be built.)
endif
.PHONY: $(ALL) $(CLEAN) all clean
all: $(ALL)
clean: $(CLEAN)
fbos_arduino_firmware:
cd c_src/farmbot-arduino-firmware && make all BUILD_DIR=$(PWD)/_build FBARDUINO_FIRMWARE_SRC_DIR=$(PWD)/c_src/farmbot-arduino-firmware/src BIN_DIR=$(PWD)/priv
fbos_clean_arduino_firmware:
cd c_src/farmbot-arduino-firmware && make clean BUILD_DIR=$(PWD)/_build FBARDUINO_FIRMWARE_SRC_DIR=$(PWD)/c_src/farmbot-arduino-firmware/src BIN_DIR=$(PWD)/priv
fbos_build_calendar_nif:
make -f c_src/build_calendar/Makefile all ERL_EI_INCLUDE_DIR=$(ERL_EI_INCLUDE_DIR) ERL_EI_LIBDIR=$(ERL_EI_LIBDIR)
fbos_clean_build_calendar_nif:
make -f c_src/build_calendar/Makefile clean ERL_EI_INCLUDE_DIR=$(ERL_EI_INCLUDE_DIR) ERL_EI_LIBDIR=$(ERL_EI_LIBDIR)