Mercurial > pub > dyncall > dyncall
annotate test/dynload_plain/Makefile.generic @ 274:5c8eb8f34ae6
- more make compat fixes for test/dynload_plain
author | Tassilo Philipp |
---|---|
date | Sat, 30 Dec 2017 00:36:00 +0100 |
parents | 883e15fca895 |
children | 483581921af2 |
rev | line source |
---|---|
272
a94a9a83dae6
- dynload_plain test handling symbol aliases, now
Tassilo Philipp
parents:
214
diff
changeset
|
1 # path to default libc.so file, easier to do via shell than in code (see main() in dynload_plain.c) |
273 | 2 # for compat: first gmake style, then assignment op which will use ! as part of var name on gmake<4 |
3 # and thus not override previously set var | |
274
5c8eb8f34ae6
- more make compat fixes for test/dynload_plain
Tassilo Philipp
parents:
273
diff
changeset
|
4 DEF_C_DYLIB=$(shell ((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1) |
5c8eb8f34ae6
- more make compat fixes for test/dynload_plain
Tassilo Philipp
parents:
273
diff
changeset
|
5 DEF_C_DYLIB!=((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1 |
272
a94a9a83dae6
- dynload_plain test handling symbol aliases, now
Tassilo Philipp
parents:
214
diff
changeset
|
6 |
214 | 7 APP = dynload_plain |
8 OBJS = dynload_plain.o | |
9 SRCTOP = ${VPATH}/../.. | |
10 BLDTOP = ../.. | |
272
a94a9a83dae6
- dynload_plain test handling symbol aliases, now
Tassilo Philipp
parents:
214
diff
changeset
|
11 CFLAGS += -I${SRCTOP}/dynload -DDEF_C_DYLIB=\"${DEF_C_DYLIB}\" |
214 | 12 LDLIBS_D += -L${BLDTOP}/dynload -ldynload_s |
272
a94a9a83dae6
- dynload_plain test handling symbol aliases, now
Tassilo Philipp
parents:
214
diff
changeset
|
13 |
214 | 14 # Works on: Darwin, NetBSD. |
15 # Linux: add '-ldl' | |
16 .PHONY: all clean install | |
17 all: ${APP} | |
18 ${APP}: ${OBJS} | |
272
a94a9a83dae6
- dynload_plain test handling symbol aliases, now
Tassilo Philipp
parents:
214
diff
changeset
|
19 ${CC} ${LDFLAGS} ${OBJS} ${LDLIBS_D} ${LDLIBS} -o ${APP} |
214 | 20 clean: |
21 rm -f ${APP} ${OBJS} | |
22 install: | |
23 mkdir -p ${PREFIX}/test | |
24 cp ${APP} ${PREFIX}/test | |
25 |