ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, Thanks for the reply. I have installed ROS. But how do I compile using the normal g++ compiler. Consider I have the following makefile. Assume hellomake.cc has some ROS code. What do i have to change. What extra LIBS should i add?

Thanks again.

IDIR =../include CC=gcc CFLAGS=-I$(IDIR)

ODIR=obj LDIR =../lib

LIBS=-lm -lgsl

_DEPS = hellomake.h DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

_OBJ = hellomake.o hellofunc.o OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

$(ODIR)/%.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS)

hellomake: $(OBJ) gcc -o $@ $^ $(CFLAGS) $(LIBS)

.PHONY: clean

clean: rm -f $(ODIR)/.o *~ core $(INCDIR)/~