In this work, we present a new method for the design of heat flux manipulating devices, with emphasis on their fabricability. The design is obtained as solution of a nonlinear optimization problem where the objective function represents the given heat flux manipulation task, and the design variables define the material distribution in the device. In order to facilitate the fabrication of the device, the material at a given point is chosen from a set of predefined metamaterials. Each candidate material is assumed to be a laminate of materials with high conductivity contrast, so it is a metamaterial with a highly anisotropic effective conductivity. Following the discrete material optimization (DMO) approach, the fraction of each material at a given finite element of the mesh is defined as a function of continuous variables, which are ultimately the design variables. This DMO definition forces the fraction of each candidate to tend to either zero or one at the optimal solution. As an application example, we designed an easy-to-make device for heat flux concentration and cloaking.