Hi Jim,
I used x10c++ "-report postcompile=1" option to see the exact compile/link
commands issued.
Below is the makefile I wrote to (re) compile my code (laplacian.x10,
params.x10, utils.x10, matrix.x10, bloc.x10) where
utils.x10
only imports standard x10 definitions
params.x10 imports
utils
bloc.x10 imports
utils, params
matrix.x10 imports
bloc params
laplacian.x10 (contains main) imports
utils matrix params
I also used a little trick to see if it's needed to recompile all C++ files :
x10c++ -commandlineonly -c myfile.x10
produce
myfile.cc myfile.h myfile.inc
If the class API (method names, arguments, return value) in myfile.x10 don't
change,
myfile.h and myfile.inc are regenerated but contain the same source, it's not
needed
to recompile another file myfile2.x10 that imports myfile.x10.
So it's interesting to compare old an new versions of myfile.cc myfile.h
myfile.inc
to save some compile time.
Hope this help.
Best Regards,
Marc
PS. If you invoke previously x10c++ whitout the -commandline option, a local
x10 directory is created
filled with a lot of files. Before using my makefile, don't forget to remove
this directory.
#-------------------------------------------------
# Makefile
.PRECIOUS: %.cc %.h
all: laplacian
%.cc: %.x10
mkdir -p src_tmp && \rm -f src_tmp/*
x10c++ -commandlineonly -c -d src_tmp $<
for i in src_tmp/* ; do diff -q $$i . || cp $$i . ; done
%.o: %.cc
${CXX} -g -pthread -DTRANSPORT=sockets -DX10_USE_BDWGC -I.
-I${X10_HOME}/include -g -c $< -o $@
laplacian: utils.o params.o bloc.o matrix.o laplacian.o
${CXX} -pthread -g -L${X10_HOME}/lib $^ -lx10 -lpthread -lgc
-lupcrts_sockets -lrt -o $@
clean:
\rm -rf laplacian *.o *.h *.cc *.inc *~
bloc.x10: utils.x10 params.x10
laplacian.x10: params.x10 matrix.x10 utils.x10
matrix.x10: bloc.x10 params.x10
params.x10: utils.x10
------------------------------------------------------------------------------------
Marc Tajchman
Laboratoire de Génie Logiciel et de Simulation
Software Engineering and Computer Simulation Laboratory
CEA-DEN/DANS/DM2S/SFME/LGLS
Tél : +33/1 69 08 73 27
Fax : +33/1 69 08 52 42
mailto:[email protected]
------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers attachés qu'il contient
sont confidentiels et destinés exclusivement à l'usage de la personne
à laquelle ils sont adressés. Si vous avez reçu ce message par erreur,
merci d'en avertir immédiatement son émetteur et de ne pas en conserver
de copie.
This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual to whom they are addressed.
If you have received this e-mail in error please inform the sender
immediately, without keeping any copy thereof.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users