Re: unusual makefiles - problems with rules



On Jul 30, 1:58 pm, Zbigniew <z...@xxxxxxxxx> wrote:
Hi,
I'm trying to compile my C++ code in such a way, that I get all .o
files directly to specified folder.
I want to avoid creation of .o files in current dir and then copy them
over to desired one.
Could someone please tell me, why the follwoing makefile does nothing?
make says: Nothing to be done for 'lib'

I do not have any .o files created...

#
# compile help modules used in .so and main server classes
# these modules are included in liasut.a library stored in ./output/
lib
# folder

# Include CPP, CC settings and others common flags
include ../make.conf.linux

.SUFFIXES : .o .cpp .c

CPPFLAGS= -c -I"../Include"
CFLAGS= -c -I"../Include"
CDEFS=

OUTL = ../output/Libs

.cpp.o:
@echo "C++ Libs source compilation $<"
@$(CPP) $(CPPFLAGS) $(CDEFS) $<

.c.$(OUTL)/%.o:
@echo "C Libs source compilation $*.c ==> $(OUTL)/$*.o"
@$(CC) $(CFLAGS) $(CDEFS) $*.c -o $(OUTL)/$*.o

$(OUTL)/%.cpp.$(OUTL)/%.o:
@echo "C++ Libs source compilation $*.cpp ==> $(OUTL)/$*.o"
@$(CPP) $(CPPFLAGS) $(CDEFS) $*.cpp -o $(OUTL)/$*.o

MODULES=$(OUTL)/AmaSocket.o \
$(OUTL)/DbgLIB.o

lib: $(MODULES)
# @echo "lib $?"
@echo "Done!"

clean:
@echo "Cleaning $(OUTL)/*.o ..."
@rm -f $(OUTL)/*.o *.o
@echo "Cleaned"

$(OUTL)/AmaSocket.o: AmaSocket.cpp
$(OUTL)/DbgLIB.o : DbgLIB.cpp DbgLIB.h Dbg.h


.



Relevant Pages

  • unusual makefiles - problems with rules
    ... I'm trying to compile my C++ code in such a way, ... files directly to specified folder. ... Nothing to be done for 'lib' ... # compile help modules used in .so and main server classes ...
    (comp.programming)
  • unusual makefiles - problems with rules
    ... I'm trying to compile my C++ code in such a way, ... files directly to specified folder. ... Nothing to be done for 'lib' ... # compile help modules used in .so and main server classes ...
    (comp.os.linux.development.apps)
  • Re: unusual makefiles - problems with rules
    ... I'm trying to compile my C++ code in such a way, ... files directly to specified folder. ... I want to avoid creation of .o files in current dir and then copy them ... Nothing to be done for 'lib' ...
    (comp.programming)
  • Re: Getting started on the HP49g+
    ... either the original HP extable lib ... extable2 lib from http://www.hpcalc.org/details.php?id=3940. ... ask again if you have any problem installing libraries. ... compile the string with ASM (listed in the development lib menu, ...
    (comp.sys.hp48)
  • Re: Help on coredll.dll
    ... I have compiled the code using eVC 3.0 and have no problem, ... So I guess I need an extra lib for SIP support in cVC 4.0. ... I use standard SDK and try to compile for ARM device. ...
    (microsoft.public.windowsce.app.development)