summaryrefslogtreecommitdiff
path: root/modules/Makefile.am
blob: 8aedea96a2797e4f6e16c7796efb5cd6fcad0ab8 (plain)
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
# To get libtool and Automake to handle this correctly it is necessary
# to pretend we are compiling shared libraries (which we are) and then
# change the names when installing.

pkglibexec_LTLIBRARIES = libtest.la libtime.la libstdlib.la

EXTRA_DIST = test.m4 time.m4 stdlib.m4

INCLUDES = -I$(srcdir)/../src -I$(srcdir)/../lib @INTLINCL@

libtest_la_SOURCES = test.c
libtime_la_SOURCES = time.c
libstdlib_la_SOURCES = stdlib.c

LIBS = 
LDFLAGS = @DLLDFLAGS@

# libperl_la_SOURCES = perl.c perlxsi.c
libperl_la_OBJECTS = perl.lo

perlxsi.c:
	perl -MExtUtils::Embed -e xsinit -- -o perlxsi.c

libperl_la_CFLAGS = `perl -MExtUtils::Embed -e ccopts`
PERLLDFLAGS = `perl -MExtUtils::Embed -e ldopts`

perl.lo: perl.c perlxsi.c
	@echo '$(LTCOMPILE) $(libperl_la_CFLAGS) -c perl.c'; \
	$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p $(libperl_la_CFLAGS) -c perl.c
	@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
	  < .deps/$(*F).p > .deps/$(*F).P
	@-rm -f .deps/$(*F).p

libperl.la: $(libperl_la_OBJECTS) $(libperl_la_DEPENDENCIES)
	$(LINK) -rpath $(pkglibexecdir) $(libperl_la_LDFLAGS) $(PERLLDFLAGS) $(libperl_la_OBJECTS) $(libperl_la_LIBADD) $(LIBS)