Update makefile
Generates listing files and a map file now.
This commit is contained in:
1
sw/.gitignore
vendored
1
sw/.gitignore
vendored
@@ -11,6 +11,7 @@
|
||||
*.ilk
|
||||
*.map
|
||||
*.exp
|
||||
lists/
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
|
||||
14
sw/Makefile
14
sw/Makefile
@@ -1,12 +1,14 @@
|
||||
CC=cl65
|
||||
CFLAGS=-t none -I. --cpu "65C02"
|
||||
LDFLAGS=-C link.ld
|
||||
LDFLAGS=-C link.ld -m $(NAME).map
|
||||
|
||||
NAME=bootrom
|
||||
|
||||
BIN=$(NAME).bin
|
||||
HEX=$(NAME).hex
|
||||
|
||||
LISTS=lists/
|
||||
|
||||
SRCS=$(wildcard *.s) $(wildcard *.c)
|
||||
OBJS+=$(patsubst %.s,%.o,$(filter %s,$(SRCS)))
|
||||
OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS)))
|
||||
@@ -20,12 +22,14 @@ $(HEX): $(BIN)
|
||||
$(BIN): $(OBJS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
%.o: %.c $(LISTS)
|
||||
$(CC) $(CFLAGS) -l $(LISTS)/$<.list -c $< -o $@
|
||||
|
||||
%.o: %.s
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
%.o: %.s $(LISTS)
|
||||
$(CC) $(CFLAGS) -l $(LISTS)/$<.list -c $< -o $@
|
||||
|
||||
$(LISTS):
|
||||
mkdir $(LISTS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||
Reference in New Issue
Block a user