annotate test/resolve_self/Makefile.generic @ 663:127b569978cc default tip

- another tweak handling clang trying to be too smart (see last commit)
author Tassilo Philipp
date Sun, 24 Mar 2024 13:52:44 +0100
parents 2536413edfd8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 APP = resolve_self
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 OBJS = main.o
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 SRCTOP = ${VPATH}/../..
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 BLDTOP = ../..
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 CFLAGS += -I${SRCTOP}/dynload
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 LDLIBS_D = -L${BLDTOP}/dynload -ldynload_s
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 .PHONY: all clean install
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 all: ${APP}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 ${APP}: ${OBJS}
621
2536413edfd8 test/resolve_self: hack for linkers not having --export-dynamic
Tassilo Philipp
parents: 620
diff changeset
10 # some linkers (e.g. apple's mach-o linker) don't know --export-dynamic, so
2536413edfd8 test/resolve_self: hack for linkers not having --export-dynamic
Tassilo Philipp
parents: 620
diff changeset
11 # try without if link fails; this is a bit hacky and should prob be part of
2536413edfd8 test/resolve_self: hack for linkers not having --export-dynamic
Tassilo Philipp
parents: 620
diff changeset
12 # of the ./configure run
2536413edfd8 test/resolve_self: hack for linkers not having --export-dynamic
Tassilo Philipp
parents: 620
diff changeset
13 ${CC} ${CFLAGS} ${LDFLAGS} -Wl,--export-dynamic ${OBJS} ${LDLIBS_D} ${LDLIBS} -o ${APP} || \
2536413edfd8 test/resolve_self: hack for linkers not having --export-dynamic
Tassilo Philipp
parents: 620
diff changeset
14 ${CC} ${CFLAGS} ${LDFLAGS} ${OBJS} ${LDLIBS_D} ${LDLIBS} -o ${APP}
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15 clean:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 rm -f ${APP} ${OBJS}
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 install:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 mkdir -p ${PREFIX}/test
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 cp ${APP} ${PREFIX}/test
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20