I'm writing a paper on classical Morse Theory and I'm interested in applying Morse functions to the computation of homology groups of a compact manifold $M$. The standard way in which this is done is by using Theorem 3.5 in Milnor's textbook, which proves that a Morse function $f: M \to \mathbb{R}$ induces a CW-structure on $M$, up to homotopy equivalence; one can then try to compute homology groups using cellular homology. What I have noticed though is that none of the textbooks I have used provide details regarding the attaching maps used in the construction of this CW-complex, only the number of cells of each dimension is readily available (i.e. the number of critical points with index equal to the dimension). This information is sufficient in the computation of homology groups of manifolds where the Morse function has no critical points with consecutive indices (like $\mathbb{C}P^n$), since in this case all cellular boundary maps (i.e. boundary maps in the cellular chain complex) are necessarily trivial. So here's the question:

Is there a simple description of cellular boundary maps in terms of the function $f$, which could be used to compute the (cellular, integral) homology of a compact manifold using a Morse theory? Or are there reasons to believe such a description would be difficult to find in general?

My guess is that if one does exists, quite a bit of work would be needed to obtain it, since, at least following Milnor's approach, theorem 3.5 is the result of cellular approximation and a couple of lemmas involving CW-complexes, in addition to local Morse-theoretic results regarding sublevel sets. Matsumoto proves the result (4.18) in a more direct fashion, but I still can't see an easy way to obtain what I'm looking for.

Something I noticed when trying to compute the homology of $\mathbb{R}P^n$ using Morse Theory was that, even though a there exists a Morse function $f \colon \mathbb{R}P^n \to \mathbb{R}$ which has exactly one critical point with index $k$, for $k = 0,\ldots, n$ and that critical values are in the same (ascending) order as indices, it isn't evident what the cellular boundary maps might be. My initial reason for thinking otherwise was that cells are attatched to sublevel sets in increaing dimension (hence no need for cellular approximation) and by embeddings $S^{k-1} \to M_{c_k - \varepsilon}$ (the sublevel set, with $c_k$ critical value) for $k >0$. However in dimension $0$ the attaching map isn't injective, and this invalidates possible inductive attempts to describe subsequent attatching maps to the $(k-1)$-skeleton of the CW-complex which is homotopy equivalent to $M$. Incidentally, these maps are the $2$-sheeted covering projections $S^k \to \mathbb{R}P^k$, but I know this for a different reason (see Hatcher p.144). So even in this "well behaved" case I wasn't able to come up with anything significant.

I also know there is a more modern, homology-oriented approach to Morse Theory, which uses gradient flow lines to compute homology directly. However I am not familiar with any details and I'm looking mainly for ways to compute the homology of $M$ using Milnor's theorem 3.5.

Thank you for any insight!