We study the complexity of constructing pseudorandom generators (PRGs) from hard functions, focussing on constant-depth circuits. We show that, starting from a function f : {0, 1}l {0, 1} computable in alternating time O(l) with O(1) alternations that is hard on average (i.e. there is a constant > 0 such that every circuit of size 2 l fails to compute f on at least a 1/poly(l) fraction of inputs) we can construct a PRG : {0, 1}O(log n) {0, 1}n computable by DLOGTIMEuniform constant-depth circuits of size polynomial in n. Such a PRG implies BP