view dyncall/Makefile.embedded @ 166:d5705f226298

- added portasm support for adding .section .note.GNU-stack "hints" marking generated .o files from assembly files as not needing an executable stack * needed to be done manually in assembly files, in contrast to C translation units where gcc adds such hints automatically * this is for security, and better/easier integration of dyncall into other projects and builds, as dyncall doesn't need an executable stack * thanks to Thorsten Behrens for bringing this up to our intention and providing a first analysis * currently only done on Linux, but will be added across other platforms (where applicable) after some testing
author cslag
date Thu, 05 Jan 2017 11:07:29 +0100
parents 3e629dc19168
children fde92442c785
line wrap: on
line source

MAKEFILE = Makefile.embedded
MAKE_CMD = ${MAKE} -f ${MAKEFILE} 
TARGET	= libdyncall_s.a
OBJS	= dyncall_vector.o dyncall_api.o dyncall_callvm.o dyncall_callvm_base.o dyncall_call.o dyncall_callf.o dyncall_struct.o
HEADERS	= dyncall_macros.h dyncall_config.h dyncall_types.h dyncall.h dyncall_signature.h dyncall_value.h dyncall_callf.h dyncall_alloc.h
all: ${TARGET}
libdyncall_s.a: ${OBJS}
	${AR} ${ARFLAGS} $@ ${OBJS}
clean:
	rm -f ${OBJS} ${TARGET}
install: all
	mkdir -p ${DESTDIR}${PREFIX}/include
	cp ${HEADERS} ${DESTDIR}${PREFIX}/include
	mkdir -p ${DESTDIR}${PREFIX}/lib
	cp ${TARGET}  ${DESTDIR}${PREFIX}/lib
	mkdir -p ${DESTDIR}${PREFIX}/man/man3
	gzip -c dyncall.3 >${DESTDIR}${PREFIX}/man/man3/dyncall.3.gz
.PHONY: all clean install
osx-universal:
	CFLAGS="${CFLAGS} -arch i386 -arch x86_64 -arch ppc" ASFLAGS="${ASFLAGS} -arch i386 -arch x86_64 -arch ppc" AR="libtool" ARFLAGS="-static -o" ${MAKE_CMD} all