CC = gcc OPTIMIZE = -O4 -funroll-loops LINK = $(CC) LIBS = -lm -lcrypt -lutil -lc PERLCONFIG = -Duselargefiles -Uuse64bitint -Uuse64bitall -Dusemymalloc \ -Ud_dosuid -Uusemallocwrap -Uusedl \ -Dprefix=/etc/staticperl/prefix \ -Uusethreads -Uuse5005threads -Uuseithreads -Uusemultiplicity -Umultiarch \ -Dcc="$(GCC)" -Doptimize="$(OPTIMIZE)" \ -Dlibs="$(LIBS)" CPPFLAGS = $(OPTIMIZE) -Iperl -Iinclude all: staticperl staticperl: src/main.o libstaticperl.a $(LINK) -o $@ $^ $(LIBS) libstaticperl.a: stamp.perl stdbundle.o src/common.o ( \ echo CREATE $@; \ echo ADDMOD stdbundle.o src/common.o; \ echo ADDLIB perl/libperl.a; \ for ext in $$(find perl/lib/auto -name "*.a"); do \ echo ADDLIB $$ext; \ done; \ echo SAVE; \ ) | $(AR) -M stdbundle.o: stdbundle.c stdbundle.c: stamp.stdbundle stamp.stdbundle: bin/staticperl-mkbundle bin/staticperl-mkbundle --bundle=main \ --dir=perl/lib --strippod --lzf --include='\.pm$$' . \ --dir=src /staticperl-boot \ --output=stdbundle.c touch stamp.stdbundle stamp.perl: stamp.perl.config (cd perl && $(MAKE)) touch stamp.perl stamp.perl.config: (cd perl && sh Configure -desO $(PERLCONFIG)) touch $@ clean: -(cd perl && $(MAKE) clean) rm -f src/*.o rm -f stamp.* rm -f stdbundle.c