You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tbm-utils/Makefile

47 lines
939 B

BUILD ?= build
all: $(BUILD)/rots-util
CFLAGS += -Iinclude
CFLAGS += -Wall -Wundef -Wextra -Wshadow -Wimplicit-function-declaration
CFLAGS += -Wredundant-decls -Wmissing-prototypes -Wstrict-prototypes
CFLAGS += -D_GNU_SOURCE
LIBS = -lcrypto -lssl
CC = gcc
LD = gcc
obj-y += source/file.o
obj-y += source/image.o
obj-y += source/info.o
obj-y += source/main.o
obj-y += source/pack.o
obj-y += source/sign.o
obj-y += source/unpack.o
obj-y += source/verify.o
obj-y += source/x509.o
obj = $(addprefix $(BUILD)/, $(obj-y))
# Include the dependencies.
-include $(obj:.o=.d)
# Set up the toolchain.
.SECONDARY:
clean:
@echo "CLEAN"
@rm -rf $(BUILD)
# Rule to compile C source code.
$(BUILD)/%.o: %.c
@echo "CC $<"
@mkdir -p $(dir $@)
@$(CC) -c $< -o $@ $(CFLAGS) -MT $@ -MMD -MP -MF $(@:.o=.d)
$(BUILD)/rots-util: $(obj) $(LDSCRIPT)
@echo "LD $@"
@mkdir -p $(dir $@)
@$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $(obj) $(LIBS)
.PHONY: clean