diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2015-09-12 14:11:23 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2015-09-15 22:43:32 -0500 |
commit | f39b2b31fc8a604d7a3972cd15473bc8cab28684 (patch) | |
tree | 0480b2ca50965fb5c3c4863ff275850e4196a994 /Makefile |
tool to create saturn boot sector
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
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 $@ |