From f39b2b31fc8a604d7a3972cd15473bc8cab28684 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 12 Sep 2015 14:11:23 -0500 Subject: tool to create saturn boot sector --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..af28deb --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +CFLAGS = -Os -pipe -std=c99 -D_POSIX_C_SOURCE=200809L +LDFLAGS = + +SRCS = $(sort $(wildcard src/*.c)) +DATA = $(sort $(wildcard src/*.bin)) +OBJS = $(SRCS:.c=.o) $(DATA:.bin=.o) +BINS = bin/satmkboot + +.PHONY: all clean + +all: $(BINS) + +clean: + rm -f $(BINS) + rm -f $(OBJS) + +bin/satmkboot: \ + src/satmkboot.o \ + src/securitycode.o \ + src/symbols.o + +%.c: %.bin + tools/bin2c $< > $@ + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +%: + $(CC) $(LDFLAGS) $^ -o $@ -- cgit v1.2.3