  In this paper, we introduce vast generalizations of the Hardy-Berndt sums.
They involve higher-order Euler and/or Bernoulli functions, in which the
variables are affected by certain linear shifts. By employing the Fourier
series technique we derive linear relations for these sums. In particular,
these relations yield reciprocity formulas for Carlitz, Rademacher, Mikol\'{a}s
and Apostol type generalizations of the Hardy-Berndt sums, and give rise to
generalizations for some Goldberg's three-term relations. We also present an
elementary proof for the Mikol\'{a}s' linear relation and a reciprocity formula
in terms of the generation function.
