-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (56 loc) · 1.39 KB
/
Makefile
File metadata and controls
63 lines (56 loc) · 1.39 KB
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
62
63
TARGET = FEHRobot
GITBINARY := git
FEHURL := google.com
FIRMWAREREPO := fehproteusfirmware
ifeq ($(OS),Windows_NT)
SHELL := CMD
endif
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)" \
( \
cd $(FIRMWAREREPO) && \
$(GITBINARY) stash && \
$(GITBINARY) pull && \
cd .. \
) \
else \
( \
$(GITBINARY) config --global http.sslVerify false && \
$(GITBINARY) clone https://code.osu.edu/fehelectronics/proteus_software/$(FIRMWAREREPO).git \
) \
) \
)
else
# Mac/Linux
@ping -c 1 -W 1000 $(FEHURL) > NUL ; \
if [ "$$?" -ne 0 ]; then \
echo "Warning: No internet connection to redmine!"; \
else \
if [ -d "$(FIRMWAREREPO)" ]; then \
cd $(FIRMWAREREPO) ; \
$(GITBINARY) stash ; \
$(GITBINARY) pull ; \
cd .. ; \
else \
$(GITBINARY) clone https://code.osu.edu/fehelectronics/proteus_software/$(FIRMWAREREPO).git ; \
fi \
fi \
endif
@cd $(FIRMWAREREPO) && make all TARGET=$(TARGET)
deploy:
@cd $(FIRMWAREREPO) && make deploy TARGET=$(TARGET)
clean:
@cd $(FIRMWAREREPO) && make clean TARGET=$(TARGET)
run:
@cd $(FIRMWAREREPO) && make run TARGET=$(TARGET)