1) Lyre of Building. -30% to all construction costs, and bypasses the MTP. Worth it for everyone wanting a cool base. And keeps it safe from pesky catapults.
2) Wall of Stone. CL 20 is what you want for free walls. (Unless your DM is cooler than the Guidebook.
) Easiest to get on Clerics thanks to Prayer Beads of Karma, domains and other shenanigans. (Without getting silly or Circle Magic.) Bards are handy at increasing other people's CL.
3) Echoing Spell from Secrets of Xendric gets you more castings of all those spells that don't need a high CL.
4) Earthfast (Druid 2, SpC, 76). Makes stone have Hardness 10 and doubles HP. 25 cubic feet per level. A Stronghold Space of Hewn Stone has 2400 cubic feet. A Freestanding wall of the same has 600.
5) Hardening (Sor/Wiz 6, SpC 109). +1 Hardness per 2CL. Area is too small on minerals for anything but doors. Wood Walls are 400 cubic feet a Space, not even 4 castings worth at minimum CL. Can make Living Wood a very interesting option. And the free wood interior walls worth sticking to, even with super Walls of Stone.
6) Greater Stone Metamorphosis (Underdark, pg 61). Can make your Walls of Stone into more interesting stone. Page 105 has fun options. 10 cubic feet +10 per level.
7) Ethereal solids are expensive. Cheaper to ethereal jaunt and encase your property in Walls of Stone or what have you. How many ghosts can batter those down?
8) Thanks to things like Spider Climb and other low level magic, realistic fortresses aren't terribly secure. All those open courtyards are effectively enemy territory. Goofy fantasy castles are much more practical, what with all that enclosed space. If you must have a courtyard treat it as a place your enemies will attack from and bar it as well as you would a main gate.
Landlord Duplo: A 26200gp module that can be replicated then linked to allow a stronghold to be build up over levels using nothing but Landlord feat and 600gp personal funds. Masonry exterior (17500), wood interior (free). 2 stories and 10 spaces.
Gatehouse .5/1000
2 Guardpost .5/600
Kitchen 1/2000
Dining Hall 2/2000
2 Barracks 1/800
Bath .5/400
Armory 1/500
2 Bedroom 1/1400
Make 1 each at 9, 10, and 11th then join them into a castle at 12th. Subbing out rooms in later Duplo modules.