cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
How to have Makefile read other extensio
How to have Makefile read other extensions as .cpp
Sep 8, 2020 at 12:15am UTC
Duffka
(2)
this question seems odd but dont ask
i dont have any program so i can give source code im just wondering and curious
is there any way for my gnu Makefile to not only read .cpp
but be able to read other file extensions i made up if it where a .cpp?
Sep 8, 2020 at 2:10am UTC
jonnin
(11437)
did you try it?
I know g++ / gcc does not care. but I don't know if the make tools do. It seems likely they would not care either?
Last edited on
Sep 8, 2020 at 2:11am UTC
Sep 8, 2020 at 3:38am UTC
mbozzi
(3932)
GNU make already knows how to build object files from .cpp files by consulting a built-in database of recipes called
implicit rules
.
You can add your own recipe for any file.
Last edited on
Sep 8, 2020 at 3:39am UTC
Sep 8, 2020 at 1:27pm UTC
Duffka
(2)
@mbozzi how do i do that?
Sep 8, 2020 at 1:37pm UTC
deleted account xyzzy
(5768)
all knowing_all seeing_internet
wrote:
https://makefiletutorial.com/
https://cs.colby.edu/maxwell/courses/tutorials/maketutor/
https://duckduckgo.com/?q=c%2B%2B+make+file+tutorial&t=ffsb&ia=web
Topic archived. No new replies allowed.