| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
include ../../Makefile.defs |
| 7 |
auto_gen= |
| 8 |
NAME=app_ruby.so |
| 9 |
|
| 10 |
PKGLIBRUBY=1 |
| 11 |
|
| 12 |
ifeq ($(CROSS_COMPILE),) |
| 13 |
BUILDER = $(shell which pkg-config) |
| 14 |
ifneq ($(BUILDER),) |
| 15 |
RUBYVER = $(shell $(BUILDER) --list-all | grep ruby | tail -1 | cut -f 1 -d " ") |
| 16 |
ifneq ($(RUBYVER),) |
| 17 |
PKGLIBRUBY = $(shell $(BUILDER) --exists $(RUBYVER) > /dev/null 2>&1 ; echo $$? ) |
| 18 |
endif |
| 19 |
endif |
| 20 |
endif |
| 21 |
|
| 22 |
ifneq ($(PKGLIBRUBY),0) |
| 23 |
BUILDER = |
| 24 |
endif |
| 25 |
|
| 26 |
ifneq ($(BUILDER),) |
| 27 |
DEFS += $(shell $(BUILDER) --cflags $(RUBYVER)) |
| 28 |
LIBS = $(shell $(BUILDER) --libs $(RUBYVER)) |
| 29 |
else |
| 30 |
ifneq (,$(findstring darwin,$(OS))) |
| 31 |
DEFS += -I/opt/local/include -I$(LOCALBASE)/include |
| 32 |
LIBS = -L/opt/local/lib -L$(LOCALBASE)/lib -lruby -lpthread -ldl |
| 33 |
else |
| 34 |
DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include |
| 35 |
LIBS = -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lruby -lpthread -ldl |
| 36 |
endif |
| 37 |
endif |
| 38 |
|
| 39 |
include ../../Makefile.modules |