Can anyone find the problem with the Makefile shown below? The last
command loops.
...
kwallace@104:~/emc2/mvx9000$ make
Makefile:27: warning: overriding commands for target `install'
/usr/share/emc/Makefile.modinc:66: warning: ignoring old commands for
target `install'
Makefile:42: warning: overriding commands for target `clean'
/usr/share/emc/Makefile.modinc:63: warning: ignoring old commands for
target `clean'
make: Warning: File `mvx9000rtu.c' has modification time 2.5e+04 s in
the future
mkdir -p .o
gcc -Os -g -I. -I/usr/realtime-2.6.32-122-rtai/include -I.
-I/usr/realtime-2.6.32-122-rtai/include -D_FORTIFY_SOURCE=0 -ffast-math
-mhard-float -DRTAI=3 -DRTAPI -D_GNU_SOURCE -Drealtime
-D_FORTIFY_SOURCE=0 -D__MODULE__ -I/usr/include/emc2 -I/usr/include/emc2
-URTAPI -U__MODULE__ -DULAPI -Os -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -MM -MT ".o/mvx9000rtu.d .o/mvx9000rtu.o"
mvx9000rtu.c -o .o/mvx9000rtu.d.tmp \
&& mv .o/mvx9000rtu.d.tmp .o/mvx9000rtu.d
Makefile:27: warning: overriding commands for target `install'
/usr/share/emc/Makefile.modinc:66: warning: ignoring old commands for
target `install'
Makefile:42: warning: overriding commands for target `clean'
/usr/share/emc/Makefile.modinc:63: warning: ignoring old commands for
target `clean'
make: Warning: File `mvx9000rtu.c' has modification time 2.5e+04 s in
the future
mkdir -p .o
gcc -Os -g -I. -I/usr/realtime-2.6.32-122-rtai/include -I.
-I/usr/realtime-2.6.32-122-rtai/include -D_FORTIFY_SOURCE=0 -ffast-math
-mhard-float -DRTAI=3 -DRTAPI -D_GNU_SOURCE -Drealtime
-D_FORTIFY_SOURCE=0 -D__MODULE__ -I/usr/include/emc2 -I/usr/include/emc2
-URTAPI -U__MODULE__ -DULAPI -Os -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -MM -MT ".o/mvx9000rtu.d .o/mvx9000rtu.o"
mvx9000rtu.c -o .o/mvx9000rtu.d.tmp \
&& mv .o/mvx9000rtu.d.tmp .o/mvx9000rtu.d
Makefile:27: warning: overriding commands for target `install'
/usr/share/emc/Makefile.modinc:66: warning: ignoring old commands for
target `install'
Makefile:42: warning: overriding commands for target `clean'
/usr/share/emc/Makefile.modinc:63: warning: ignoring old commands for
target `clean'
make: Warning: File `mvx9000rtu.c' has modification time 2.5e+04 s in
the future
mkdir -p .o
... ad infinitum
~~~~~~~~~~~~~
Makefile
~~~~~~~~~~~~~
default: mvx9000rtu
MODINC := $(shell ./find-modinc)
BINDIR := $(shell ./find-bindir)
ifeq "$(MODINC)" ""
$(error Required files for building components not present. Install
emc2-dev)
endif
include $(MODINC)
ifeq ($(RUN_IN_PLACE),no)
EXTRA_CFLAGS += -I$(EMC2_HOME)/include/emc2
LIBDIR := $(shell ./find-libdir)
ifeq "$(LIBDIR)" ""
$(error LIBDIR not found)
endif
endif
CFLAGS := $(EXTRA_CFLAGS) -URTAPI -U__MODULE__ -DULAPI -Os
CFLAGS += $(shell pkg-config --cflags glib-2.0)
LFLAGS := -Wl,-rpath,$(LIBDIR) -L$(LIBDIR) -lemchal
LFLAGS += $(shell pkg-config --libs glib-2.0)
include .o/mvx9000rtu.d .o/modbus.d
install: mvx9000rtu
cp mvx9000rtu $(BINDIR)
mvx9000rtu: .o/mvx9000rtu.o .o/modbus.o
$(CC) -o $@ $^ $(LFLAGS)
.o/%.o: %.c
mkdir -p .o
$(CC) $(CFLAGS) -o $@ -c $<
.o/%.d: %.c
mkdir -p .o
$(CC) $(CFLAGS) -MM -MT "$@ $(patsubst %.d,%.o,$@)" $< -o [email protected] \
&& mv [email protected] $@
clean:
-rm -f mvx9000rtu
-rm -rf .o
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers