-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (38 loc) · 1.15 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
40
41
42
43
44
TARGET = current
GITBINARY := git
FEHURL := google.com
FIRMWAREREPO := fehproteusfirmware
all:
ifeq ($(OS),Windows_NT)
# check for internet connection
# if there's internet, check to see if FEHRobotController folder exists
# if it does, remove it before cloning the repo
@ping -n 1 -w 1000 $(FEHURL) > NUL & \
if errorlevel 1 \
( \
( echo "Warning: No internet connection!" ) \
) \
else \
( \
( if exist "$(FIRMWAREREPO)" \
( \
rd /s /q $(FIRMWAREREPO) \
) ) && \
$(GITBINARY) config --global http.sslVerify false && \
$(GITBINARY) clone https://redmine.engr1.ohio-state.edu/gitlab/feh/$(FIRMWAREREPO).git \
)
else
# Linux
if [ -d $(FIRMWAREREPO) ]; then \
$(GITBINARY) --git-dir=$(FIRMWAREREPO)/.git pull ; \
else \
$(GITBINARY) clone https://redmine.engr1.ohio-state.edu/gitlab/feh/$(FIRMWAREREPO).git ; \
fi
endif
@cd $(FIRMWAREREPO) && make -f ../resources/Makefile all TARGET=$(TARGET)
deploy:
@cd $(FIRMWAREREPO) && make deploy TARGET=$(TARGET)
clean:
@cd $(FIRMWAREREPO) && make clean TARGET=$(TARGET)
run:
@cd $(FIRMWAREREPO) && make run TARGET=$(TARGET)