I'd suggest you first understand the composition of the two mentioned type of battries and the kind of charging cycle n time you need to provide. Making a charger ckt, specially for Lead Acid, is not that difficult but its calibration is gonna be a bit tricky.