Browse files

Alternate compilations method (possibly works with older perl)

  • Loading branch information...
1 parent 32182f2 commit 8554f97b70ee9ea2e1082ae77b051aaf433476b9 Jonathan Steinert committed with Jonathan Steinert Mar 11, 2010
Showing with 8 additions and 5 deletions.
  1. +8 −5 Makefile.PL
View
13 Makefile.PL
@@ -14,23 +14,26 @@ makemaker_args(
);
postamble(<<'EOT');
+CCOPTS = $(shell $(PERLRUN) -MExtUtils::Embed -e ccopts)
+LDOPTS = $(shell $(PERLRUN) -MExtUtils::Embed -e ldopts)
+
perlxsi.c:
$(PERLRUN) -MExtUtils::Embed -e xsinit
perlxsi.o: perlxsi.c
- $(CCCMD) "-I$(PERL_INC)" -Wall -g -fPIC -c perlxsi.c
+ $(CC) $(CCOPTS) $(CCCDLFLAGS) $(OPTIMIZE) "-I$(PERL_INC)" -Wall -c perlxsi.c
perl_helper.o: perl_helper.c
- $(CCCMD) "-I$(PERL_INC)" -Wall -g -fPIC -c perl_helper.c
+ $(CC) $(CCOPTS) $(CCCDLFLAGS) $(OPTIMIZE) "-I$(PERL_INC)" $(INC) -Wall -c perl_helper.c
perl_helper.so: perl_helper.o perlxsi.o
- $(LD) $(CCDLFLAGS) $(LDDLFLAGS) "-L$(PERL_INC)" -lperl -lpam -o perl_helper.so perl_helper.o perlxsi.o
+ $(LD) $(LDOPTS) $(LDDLFLAGS) $(EXTRALIBS) -o perl_helper.so perl_helper.o perlxsi.o
pam_perl.o: pam_perl.c
- $(CCCMD) -Wall -g -fPIC -c pam_perl.c
+ $(CC) $(CCOPTS) $(CCCDLFLAGS) $(OPTIMIZE) $(INC) -Wall -c pam_perl.c
pam_perl.so: pam_perl.o
- $(LD) $(CCDLFLAGS) $(LDDLFLAGS) -o pam_perl.so pam_perl.o
+ $(LD) $(LDOPTS) $(LDDLFLAGS) -o pam_perl.so pam_perl.o
pam: pam_perl.so perl_helper.so

0 comments on commit 8554f97

Please sign in to comment.