26 lines
577 B
Makefile
26 lines
577 B
Makefile
# Define directories
|
|
SRC_DIR = ../src
|
|
PROGRAMS_DIR = ../programs
|
|
PROGRAMS_LIB_DIR = $(PROGRAMS_DIR)/lib
|
|
ASSEMBLE = $(SRC_DIR)/assemble
|
|
SOURCE = $(PROGRAMS_DIR)/led_blink.s
|
|
OUTPUT = $(PROGRAMS_DIR)/kernel8.img
|
|
|
|
# Default target
|
|
default:
|
|
$(MAKE) -C $(SRC_DIR)
|
|
cd $(SRC_DIR) && $(ASSEMBLE) $(SOURCE) $(OUTPUT)
|
|
cd $(PROGRAMS_DIR)
|
|
$(MAKE) -C $(SRC_DIR) clean
|
|
|
|
commented: remove_comments default
|
|
|
|
remove_comments:
|
|
python $(PROGRAMS_LIB_DIR)/remove_comments.py $(PROGRAMS_LIB_DIR)/led_blink_commented.s $(SOURCE)
|
|
|
|
|
|
# Clean
|
|
clean:
|
|
$(MAKE) -C $(SRC_DIR) clean
|
|
rm -f $(OUTPUT)
|
|
|