GNU Make 4 · Rules and targets
Compile every source file
Build any .o file from the matching .c file. $< is the first prerequisite and $@ is the target.
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
Official GNU Make 4 documentation
GNU Make 4 · Rules and targets
Build any .o file from the matching .c file. $< is the first prerequisite and $@ is the target.
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
Official GNU Make 4 documentation
Was this page helpful?