forked from sidkurella/cs-140e-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (24 loc) · 773 Bytes
/
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
ASSIGNMENT_NAME := assignment1
BASE_URL := https://cs140e.sergio.bz
FILES_DIR := files
FIRMWARE_DIR := $(FILES_DIR)/firmware
FIRMWARE_TAR := $(FIRMWARE_DIR).tar.gz
ASSIGNMENT_FILES := $(FIRMWARE_TAR) $(addprefix $(FILES_DIR)/,act-led-blink.bin)
.PHONY: all fetch
all:
@echo "usage: make [target]"
@echo "fetch download assignment files"
@echo "clean clean products from all targets"
fetch: $(FIRMWARE_DIR) $(ASSIGNMENT_FILES)
$(FILES_DIR):
@mkdir -p $@
$(ASSIGNMENT_FILES): | $(FILES_DIR)
wget $(BASE_URL)/files/$(@:$(FILES_DIR)/%=%) -O $@
$(FIRMWARE_DIR): $(FIRMWARE_TAR) | $(FILES_DIR)
tar -xzvf $^ -C $(FILES_DIR)
@touch $(FIRMWARE_DIR)
clean:
rm -rf $(FILES_DIR)
make clean -C kernel
cd volatile && cargo clean
cd pi && cargo clean