-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
25 lines (22 loc) · 1023 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
CFLAGS = -m
CC = sdcc
AARCH = mcs51
BUILD_DIR = ./target/at89s8253/build
BIN_DIR = ./target/at89s8253
SRC_DIR = ./src
default: build
clean:
rm -rf $(BUILD_DIR)/*
rm -f $(BIN_DIR)/main.hex
build: clean
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c delay.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c utils.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c column.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c display.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c display_interface.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c serial_io.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c ./disp_modes/text.c; popd
#pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) -c ./disp_modes/bar.c; popd
pushd $(SRC_DIR); $(CC) $(CFLAGS)$(AARCH) main.c delay.rel serial_io.rel utils.rel column.rel display.rel display_interface.rel text.rel; popd
pushd $(SRC_DIR); mv *.ihx *.sym *.rst *.rel *.mem *.map *.lst *.lk *.asm ../$(BUILD_DIR); popd
packihx $(BUILD_DIR)/main.ihx > $(BIN_DIR)/main.hex