replace gen.pl by cat, rename mpi.c to mp_all.c
This commit is contained in:
parent
da8b978785
commit
1ece193af2
4
.gitignore
vendored
4
.gitignore
vendored
@ -60,8 +60,8 @@ UpgradeLog*.htm
|
||||
perf.data
|
||||
perf.data.old
|
||||
|
||||
# ignore mpi.c generated by make
|
||||
mpi.c
|
||||
# ignore mp_all.c generated by make
|
||||
mp_all.c
|
||||
|
||||
# ignore file generated by make tune
|
||||
tuning_list
|
||||
|
20
gen.pl
20
gen.pl
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
#
|
||||
# Generates a "single file" you can use to quickly
|
||||
# add the whole source without any makefile troubles
|
||||
#
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
open(my $out, '>', 'mpi.c') or die "Couldn't open mpi.c for writing: $!";
|
||||
foreach my $filename (glob '*mp_*.c') {
|
||||
open(my $src, '<', $filename) or die "Couldn't open $filename for reading: $!";
|
||||
print {$out} "/* Start: $filename */\n";
|
||||
print {$out} $_ while <$src>;
|
||||
print {$out} "\n/* End: $filename */\n\n";
|
||||
close $src or die "Error closing $filename after reading: $!";
|
||||
}
|
||||
print {$out} "\n/* EOF */\n";
|
||||
close $out or die "Error closing mpi.c after writing: $!";
|
||||
|
||||
system('perl -pli -e "s/\s*$//" mpi.c');
|
16
makefile
16
makefile
@ -71,13 +71,13 @@ profiled:
|
||||
|
||||
#make a single object profiled library
|
||||
profiled_single:
|
||||
perl gen.pl
|
||||
$(CC) $(LTM_CFLAGS) -fprofile-arcs -DTESTING -c mpi.c -o mpi.o
|
||||
$(CC) $(LTM_CFLAGS) -DTESTING -DTIMER demo/timing.c mpi.o -lgcov -o timing
|
||||
cat *mp_*.c > mp_all.c
|
||||
$(CC) $(LTM_CFLAGS) -fprofile-arcs -DTESTING -c mp_all.c -o mp_all.o
|
||||
$(CC) $(LTM_CFLAGS) -DTESTING -DTIMER demo/timing.c mp_all.o -lgcov -o timing
|
||||
./timing
|
||||
rm -f *.o timing
|
||||
$(CC) $(LTM_CFLAGS) -fbranch-probabilities -DTESTING -c mpi.c -o mpi.o
|
||||
$(AR) $(ARFLAGS) $(LIBNAME) mpi.o
|
||||
$(CC) $(LTM_CFLAGS) -fbranch-probabilities -DTESTING -c mp_all.c -o mp_all.o
|
||||
$(AR) $(ARFLAGS) $(LIBNAME) mp_all.o
|
||||
ranlib $(LIBNAME)
|
||||
|
||||
install: $(LIBNAME)
|
||||
@ -121,9 +121,9 @@ docs manual:
|
||||
.PHONY: pre_gen
|
||||
pre_gen:
|
||||
mkdir -p pre_gen
|
||||
perl gen.pl
|
||||
sed -e 's/[[:blank:]]*$$//' mpi.c > pre_gen/mpi.c
|
||||
rm mpi.c
|
||||
cat *mp_*.c > mp_all.c
|
||||
sed -e 's/[[:blank:]]*$$//' mp_all.c > pre_gen/mp_all.c
|
||||
rm mp_all.c
|
||||
|
||||
zipup: clean astyle new_file docs
|
||||
@# Update the index, so diff-index won't fail in case the pdf has been created.
|
||||
|
@ -164,7 +164,7 @@ cleancov: cleancov-clean clean
|
||||
clean:
|
||||
rm -f *.gcda *.gcno *.gcov *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o \
|
||||
demo/*.o test timing mtest_opponent mtest/mtest mtest/mtest.exe tuning_list \
|
||||
*.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la
|
||||
*.s mp_all.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la
|
||||
rm -rf .libs/ demo/.libs
|
||||
${MAKE} -C etc/ clean MAKE=${MAKE}
|
||||
${MAKE} -C doc/ clean MAKE=${MAKE}
|
||||
|
Loading…
Reference in New Issue
Block a user