radare2/libr/magic/Makefile
pancake 8b33d764a7
Fix #3929 - Enable LTO in sys/static.sh ##build (#17141)
* Fix #3929 - Enable LTO in sys/static.sh
* Update Ubuntu to 20.04 for static build
* Use `gcc-ar` when needed
* Do not use "c" option for ${AR}
* Use `$$AR` instead of `$AR`
* Aim to fix  `-dynamiclib` issue outside darwin
* Run tests for static LTO build

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-08-13 13:55:39 +08:00

22 lines
392 B
Makefile

include ../../global.mk
include $(LTOP)/config.mk
NAME=r_magic
R2DEPS=r_util
PCLIBS=@LIBMAGIC@
CFLAGS+=-I.
OBJS=apprentice.o ascmagic.o fsmagic.o funcs.o is_tar.o magic.o softmagic.o
include deps.mk
include $(LTOP)/rules.mk
libfile.a:
${CC} -c ${CFLAGS} ${SRC}
${AR} q libfile.a *.o
${RANLIB} libfile.a
BIN=file${EXT_EXE}
${BIN}:
${CC} -I../include ${CFLAGS} ${SRC} file.c -o ${BIN}