> > > I see in src/Makefile, motmod-objs > > > gets emc/motion/motion.o, emc/motion/command.o, etc., but where are > > > these object files being built from the .c files? Submakefile under > > > emc/motion only copies headers to ../includes. There is nothing to > > > compile these source files. > > > > I see where the .o files are listed but somewhere in the makefile or > submakefiles there must be instructions to compile from .c or .cc to form > those .o files. And I don't see it anywhere.
motmod.o is added to obj-m var with obj-$(CONFIG_MOTMOD) += motmod.o then RTOBJS := $(sort $(foreach mod,$(obj-m),$(call TORTOBJS,$(mod)))) TORTOBJS = $(foreach file,$($(patsubst %.o,%,$(1))-objs), objects/rt$(file)) adds motmod-objs to RTOBJS. and finally the rule call the compiler: # Rules to make .o (object) files $(sort $(RTOBJS)) : objects/rt%.o : %.c $(ECHO) Compiling realtime $< @rm -f $@ @mkdir -p $(dir $@) $(Q)$(CC) -c $(OPT) $(DEBUG) $(EXTRA_DEBUG) -DRTAPI -I../include \ $(EXTRA_CFLAGS) \ -MP -MD -MF "${@:.o=.d}" -MT "$@" \ $< -o $@ /dmitry _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers