wiktionary
ref
rough + -ly
etymonline
ref
roughly (adv.)
c. 1300, roughlie, "ungently, violently," from rough (adj.) + -ly (2). Hence "without much care or skill, in a rude or imperfect way," c. 1600; the meaning "approximately, without precision or exactness" is from 1841.