| 1 |
# -*- makefile -*- |
| 2 |
|
| 3 |
OBJECTS = init.o poll.o errors.o processx-connection.o \ |
| 4 |
processx-vector.o create-time.o base64.o \ |
| 5 |
unix/childlist.o unix/connection.o \ |
| 6 |
unix/processx.o unix/sigchld.o unix/utils.o \ |
| 7 |
unix/named_pipe.o cleancall.o |
| 8 |
|
| 9 |
all: tools/px tools/sock supervisor/supervisor client$(SHLIB_EXT) $(SHLIB) strip |
| 10 |
|
| 11 |
strip: $(SHLIB) tools/px tools/sock supervisor/supervisor client$(SHLIB_EXT) |
| 12 |
@if which strip >/dev/null && which uname >/dev/null && test "`uname`" = "Linux" && test "$$_R_SHLIB_STRIP_" = "true" && test -n "$$R_STRIP_SHARED_LIB"; then \ |
| 13 |
echo stripping $(SHLIB) tools/px tools/sock supervisor/supervisor client$(SHLIB_EXT); \ |
| 14 |
echo $$R_STRIP_SHARED_LIB $(SHLIB) tools/px tools/sock supervisor/supervisor client$(SHLIB_EXT); \ |
| 15 |
$$R_STRIP_SHARED_LIB $(SHLIB) tools/px tools/sock supervisor/supervisor client$(SHLIB_EXT); \ |
| 16 |
fi |
| 17 |
|
| 18 |
.PHONY: all clean strip |
| 19 |
|
| 20 |
tools/px: tools/px.c |
| 21 |
$(CC) $(CFLAGS) $(LDFLAGS) -Wall tools/px.c -o tools/px |
| 22 |
|
| 23 |
supervisor/supervisor: supervisor/supervisor.c supervisor/utils.c |
| 24 |
$(CC) $(CFLAGS) $(LDFLAGS) supervisor/supervisor.c \ |
| 25 |
supervisor/utils.c -o supervisor/supervisor |
| 26 |
|
| 27 |
tools/sock: tools/sock.c |
| 28 |
$(CC) $(CFLAGS) $(LDFLAGS) -I../inst/include -Wall tools/sock.c -o tools/sock |
| 29 |
|
| 30 |
CLIENT_OBJECTS = base64.o client.o errors.o |
| 31 |
|
| 32 |
client$(SHLIB_EXT): $(CLIENT_OBJECTS) |
| 33 |
$(SHLIB_LINK) -o client$(SHLIB_EXT) $(CLIENT_OBJECTS) $(PKG_LIBS) \ |
| 34 |
$(SHLIB_LIBADD) $(LIBR) |
| 35 |
@if [ -n "${PROCESSX_UNLINK_R}" ]; then \ |
| 36 |
echo Removing libR.so dependency from client.so; \ |
| 37 |
patchelf --remove-needed libR.so client$(SHLIB_EXT); \ |
| 38 |
fi |
| 39 |
|
| 40 |
clean: |
| 41 |
rm -rf $(SHLIB) $(OBJECTS) $(CLIENT_OBJECTS) \ |
| 42 |
supervisor/supervisor supervisor/supervisor.dSYM \ |
| 43 |
supervisor/supervisor.exe tools/px tools/sock \ |
| 44 |
client$(SHLIB_EXT) |