diff options
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 $@ |