|
|
1 | CC = gcc |
|
|
2 | OPTIMIZE = -O4 -funroll-loops |
|
|
3 | LINK = $(CC) |
|
|
4 | LIBS = -lm -lcrypt -lutil -lc |
|
|
5 | |
1 | PERLCONFIG = -Duselargefiles -Uuse64bitint -Uuse64bitall -Dusemymalloc \ |
6 | PERLCONFIG = -Duselargefiles -Uuse64bitint -Uuse64bitall -Dusemymalloc \ |
2 | -Ud_dosuid -Uusemallocwrap -Uusedl \ |
7 | -Ud_dosuid -Uusemallocwrap -Uusedl \ |
3 | -Dprefix=/etc/staticperl/prefix \ |
8 | -Dprefix=/etc/staticperl/prefix \ |
4 | -Uusethreads -Uuse5005threads -Uuseithreads -Uusemultiplicity -Umultiarch \ |
9 | -Uusethreads -Uuse5005threads -Uuseithreads -Uusemultiplicity -Umultiarch \ |
5 | -Dcc=gcc -Doptimize="-O4 -funroll-loops" \ |
10 | -Dcc="$(GCC)" -Doptimize="$(OPTIMIZE)" \ |
6 | -Dlibs="-lm -lcrypt -lutil -lc" |
11 | -Dlibs="$(LIBS)" |
7 | |
12 | |
|
|
13 | CPPFLAGS = $(OPTIMIZE) -Iperl -Iinclude |
|
|
14 | |
8 | all: stamp.perl |
15 | all: staticperl |
|
|
16 | |
|
|
17 | staticperl: src/main.o libstaticperl.a |
|
|
18 | $(LINK) -o $@ $^ $(LIBS) |
|
|
19 | |
|
|
20 | libstaticperl.a: stamp.perl stdbundle.o src/common.o |
|
|
21 | ( \ |
|
|
22 | echo CREATE $@; \ |
|
|
23 | echo ADDMOD stdbundle.o src/common.o; \ |
|
|
24 | echo ADDLIB perl/libperl.a; \ |
|
|
25 | for ext in $$(find perl/lib/auto -name "*.a"); do \ |
|
|
26 | echo ADDLIB $$ext; \ |
|
|
27 | done; \ |
|
|
28 | echo SAVE; \ |
|
|
29 | ) | $(AR) -M |
|
|
30 | |
|
|
31 | stdbundle.o: stdbundle.c |
|
|
32 | |
|
|
33 | stdbundle.c: stamp.stdbundle |
|
|
34 | |
|
|
35 | stamp.stdbundle: bin/staticperl-mkbundle |
|
|
36 | bin/staticperl-mkbundle --bundle=main \ |
|
|
37 | --dir=perl/lib --strippod --lzf --include='\.pm$$' . \ |
|
|
38 | --dir=src /staticperl-boot \ |
|
|
39 | --output=stdbundle.c |
|
|
40 | touch stamp.stdbundle |
9 | |
41 | |
10 | stamp.perl: stamp.perl.config |
42 | stamp.perl: stamp.perl.config |
11 | (cd perl && $(MAKE)) |
43 | (cd perl && $(MAKE)) |
12 | #touch stamp.perl |
44 | touch stamp.perl |
13 | |
45 | |
14 | stamp.perl.config: |
46 | stamp.perl.config: |
15 | (cd perl && sh Configure -desO $(PERLCONFIG)) |
47 | (cd perl && sh Configure -desO $(PERLCONFIG)) |
16 | touch $@ |
48 | touch $@ |
17 | |
49 | |
18 | clean: |
50 | clean: |
19 | -(cd perl && $(MAKE) clean) |
51 | -(cd perl && $(MAKE) clean) |
|
|
52 | rm -f src/*.o |
20 | rm stamp.* |
53 | rm -f stamp.* |
|
|
54 | rm -f stdbundle.c |
|
|
55 | |