Multiple source files for one header Makefile

I have one header file Header1.h with multiple functions that are implemented in separate .cpp i.e. Func1.cpp, Func2.cpp.

So if I only had one header file and one cpp I would write:

Func1.o: Header1.h Func1.cpp gcc -c Func1.cpp Header1.h 

But writing:

Func1.o: Header1.h Func1.cpp      gcc -c Func1.cpp  Header1.h   Func2.o: Header1.h Func2.cpp      gcc -c Func2.cpp  Header1.h 

does not work.

Replay

Category: makefile Time: 2016-07-29 Views: 0
Tags: makefile

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.208 (s). 12 q(s)