lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | _LIBMK := $(lastword $(wordlist 1,$(shell expr $(words $(MAKEFILE_LIST)) - 1),$(MAKEFILE_LIST))) |
| 2 | _LIBNAME := $(notdir $(patsubst %/,%,$(dir $(abspath $(_LIBMK))))) |
| 3 | ALL := $(OUT)lib$(_LIBNAME).a |
| 4 | LIB_RULES := $(lastword $(MAKEFILE_LIST)) |
| 5 | include $(dir $(LIB_RULES))build.rules |
| 6 | |
| 7 | ifdef TEST_FUZZ |
| 8 | CFLAGS += -DCONFIG_NO_RANDOM_POOL |
| 9 | CFLAGS += -DTEST_FUZZ |
| 10 | endif |
| 11 | |
| 12 | CFLAGS += $(FUZZ_CFLAGS) |
| 13 | CFLAGS += -I.. -I../utils |
| 14 | |
| 15 | _OBJS_VAR := LIB_OBJS |
| 16 | include ../objs.mk |
| 17 | |
| 18 | $(ALL): $(LIB_OBJS) |
| 19 | @$(E) " AR $(notdir $@)" |
| 20 | $(Q)$(AR) crT $@ $? |
| 21 | |
| 22 | install-default: |
| 23 | @echo Nothing to be made. |
| 24 | |
| 25 | %: %-default |
| 26 | @true |
| 27 | |
| 28 | clean: common-clean |
| 29 | $(Q)rm -f *~ *.o *.d *.gcno *.gcda *.gcov $(ALL) |