File: Makevars

package info (click to toggle)
r-cran-fs 1.6.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 760 kB
  • sloc: cpp: 1,314; ansic: 534; sh: 13; makefile: 2
file content (50 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
UNAME := $(shell uname)

LIBUV := libuv-1.44.2

PKG_LIBS = -luv -pthread

SOURCES = $(wildcard *.cc unix/*.cc)
OBJECTS = $(SOURCES:.cc=.o)

ifeq ($(UNAME), SunOS)
PKG_LIBS += -lkstat -lsendfile -lsocket -lxnet
OBJECTS +=  bsd/setmode.o bsd/strmode.o bsd/reallocarray.o
endif
ifeq ($(UNAME), FreeBSD)
PKG_LIBS += -lkvm
endif
ifeq ($(UNAME), OpenBSD)
PKG_LIBS += -lkvm
endif
ifeq ($(UNAME), NetBSD)
PKG_LIBS += -lkvm
endif
ifneq ($(filter $(UNAME), Linux AIX OS400),)
OBJECTS +=  bsd/setmode.o bsd/strmode.o bsd/reallocarray.o
endif

PKG_CPPFLAGS = -I. -pthread

all: $(SHLIB)

$(SHLIB):

# Avoid re-running autoconf/automake/aclocal.
# Need the timestamps in the right order.
$(LIBUV)/Makefile:
	touch $(LIBUV)/aclocal.m4 && touch $(LIBUV)/configure && touch $(LIBUV)/Makefile.in
	(cd $(LIBUV) \
	&& CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY) -std=c99" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(R_CONFIGURE_FLAGS) --quiet)

$(LIBUV)/.libs/libuv.a: $(LIBUV)/Makefile
	$(MAKE) --directory=$(LIBUV) \
		HAVE_DTRACE=0

.PHONY: shlib-clean clean

# shlib-clean: clean

clean:
	$(MAKE) --directory=$(LIBUV) distclean
	rm -f $(OBJECTS)