'How to add more than one header(HDRs) and object in a makefile?

HDRS = EventLoop.h Data.h
OBJS = EventLoop.o Data.o
dict_$(PROGRAM).o

This is from my makefile, I want to add another Data.h and Data.o in it , kindly help! Tried adding it infront/ on the next line but is giving errorrs

when I add more than one header and obj in the same lines it gives this error, maybe it has something to do with the dict declared below? EventLoop.h: No such file or directory #include "EventLoop.h" ^~~~~~~~~~~~~ compilation terminated. <builtin>: recipe for target 'EventLoop.o' failed make: *** [EventLoop.o] Error 1



Solution 1:[1]

Which errors are you getting? You can add multiple files to a variable by using space to separate them

HDRS = EventLoop.h Data.h

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mdze