This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Convert t/op/die_except.t to test.pl, strict and warnings.
[perl5.git] / Cross / Makefile
CommitLineData
6a809565 1## Toplevel Makefile for cross-compilation of perl
6a809565 2
e4568ebb 3export TOPDIR=${shell pwd}
6a809565
JH
4include $(TOPDIR)/config
5export CFLAGS
6export SYS=$(ARCH)-$(OS)
7export CROSS=$(ARCH)-$(OS)-
8export FULL_OPTIMIZATION = -fexpensive-optimizations -fomit-frame-pointer -O2
9export OPTIMIZATION = -O2
10
11export CC = $(CROSS)gcc
12export CXX = $(CROSS)g++
13export LD = $(CROSS)ld
14export STRIP = $(CROSS)strip
15export AR = $(CROSS)ar
16export RANLIB = $(CROSS)ranlib
17
18
19## Optimisation work
20ifeq ($(ARCH),arm)
21 ifdef CONFIG_TARGET_ARM_SA11X0
22 ifndef Architecture
23 Architecture = armv4l-strongarm
24 endif
25 FULL_OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32
26 OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32
27 endif
28endif
29
30CFLAGS+=$(FULL_OPTIMIZATION)
31
32all:
33 @echo Please read the README file before doing anything else.
34
35gen_patch:
36 diff -Bbur ../Makefile.SH Makefile.SH > Makefile.SH.patch
37 diff -Bbur ../installperl installperl > installperl.patch
38
39patch:
e4568ebb
RD
40 cd .. ; if [ ! -e ./CROSS_PATCHED ] ; then \
41 patch -p1 < Cross/Makefile.SH.patch; \
42 patch -p1 < Cross/installperl.patch ; mv installperl installperl-patched; \
43 sed -e 's/XXSTRIPXX/$(SYS)/' installperl-patched > installperl; \
44 touch CROSS_PATCHED ; fi
6a809565
JH
45
46perl:
47 @echo Perl cross-build directory is $(TOPDIR)
48 @echo Target arch is $(SYS)
49 @echo toolchain: $(CC), $(CXX), $(LD), $(STRIP), $(AR), $(RANLIB)
50 @echo Optimizations: $(FULL_OPTIMIZATION)
51
52 $(TOPDIR)/generate_config_sh config.sh-$(SYS) > $(TOPDIR)/../config.sh
6a809565 53 cd $(TOPDIR)/.. ; ./Configure -S ; make depend ; make ; make more
baa5ec3e 54 cd $(TOPDIR)/.. ; mkdir -p fake_config_library ; cp lib/Config.pm lib/Config_heavy.pl fake_config_library
6a809565
JH
55 cd $(TOPDIR)/.. ; $(MAKE) more2 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
56 cd $(TOPDIR)/.. ; $(MAKE) more3 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
57 cd $(TOPDIR)/.. ; $(MAKE) more4 "PERLRUN=/usr/bin/perl -I$(TOPDIR)/../fake_config_library -MConfig"
58 cd $(TOPDIR)/.. ; rm -rf install_me_here
59 cd $(TOPDIR)/.. ; make install-strip
60 cd $(TOPDIR)/.. ; sh -x Cross/warp
61
62