Makefile implicit rules matching .c OR .cpp -


i'm trying add implicit rule makefile, , i'd handle compilation of .c , .cpp files same way. rule have .c files follows:

%.obj: %.c     cl /c $(cflags) $< 

what i'd like, though, right side of pattern match .c or .cpp, depending on file available. possible? i've perused make manual, haven't found i'm looking for. appreciated.

just use 2 rules equivalent "or" in make language:

%.obj: %.c     cl /c $(cflags) $<  %.obj: %.cpp     cl /c $(cflags) $< 

at end these are 2 different source languages , may end desiring different flags.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -