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
Post a Comment