Re: unusual makefiles - problems with rules
- From: toby <toby@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 06:30:40 -0700
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
.
- References:
- unusual makefiles - problems with rules
- From: Zbigniew
- unusual makefiles - problems with rules
- Prev by Date: Re: State pattern query
- Next by Date: Re: unusual makefiles - problems with rules
- Previous by thread: unusual makefiles - problems with rules
- Next by thread: Re: unusual makefiles - problems with rules
- Index(es):
Relevant Pages
|