Hello, On Tue, Mar 27, 2007 at 05:40:06AM -0700, Artus wrote: > What should I write in Makefile.am to inform automake that .c files in this > specific directory are C++ source files and not C files? I tried the > following with no sucess (and I do not want to rename the files).
"no success" is far from a good description of your problem. Anyway: > # Makefile.am > .c.o: > $(CXX) $(CXXFLAGS) -c $< -o $@ > lib_LTLIBRARIES = libadn.la > libadn_la_SOURCES = adn.h adn.c tim.c cyto.c since you are using lib_LTLIBRARIES, it's .c.lo which is involved here, not .c.o Another solution: Even though you cannot use the right names permanently, you can use them temporarily. Try this Makefile.am: lib_LTLIBRARIES = libadn.la libadn_la_SOURCES = adn.h adn.c tim.c cyto.c .c.lo: .c.cc: $(LN_S) $< $@ EXTRA_PROGRAMS = fake nodist_fake_SOURCES = fake.cc I tested this, and it works. The fake program is there to drag in C++ support. Please note that though the *.cc files are temporarily created, make delets them at the end, because they are intermediate. (Use info '(make)Chained Rules' to read details.) Could you live with this? Have a nice day, Stepan Kasal