bug-make
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Make error
From
:
spai
Subject
:
Make error
Date
:
Wed, 26 Nov 2003 14:53:20 -0800
I like the idea of using implicit rules
to do all the work. With that objective, is there an elegant
way to do than doing it as follow:
bld_dir = ../obj
$(bld_dir)/%.o: %.cpp
$(COMPILE.cpp) $(OUTPUT_OPTION) $<
The above rule above creates all the object files in ../obj directory.
However using:
$(bin_dir)/%: %.cpp
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
gives the following error.
gnumake: *** No rule to make target `../bin/OneLevel_OneGlobal_SASD', needed by `build'. Stop.
The full makefile is shown below.
# $Source$
#
SYSTEMC = /prj/vlsi/scp/osci/systemc-2.0.1
bin_dir = ../bin
# Set the default variables
CC = g++
CXXFLAGS = -g -Wall -Wno-deprecated
TARGET_ARCH =
CPPFLAGS = -I$(SYSTEMC)/include \
-I../axi
#Libraries:
LDFLAGS=-g
LDLIBS = \
-L../lib -lqctaxicore \
-L$(SYSTEMC)/lib-gccsparcOS5 -lsystemc -lm
target_bus_models = \
OneLevel_OneGlobal_SASD.cpp
# Executables
TARGETS = $(target_bus_models:%.cpp=$(bin_dir)/%)
$(bin_dir)/%: %.cpp
$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
# Build all targets
build: $(TARGETS)
# Clean directory
clean:
rm -rf $(TARGETS)
reply via email to
[
Prev in Thread
]
Current Thread
[Next in Thread]
make error
,
spai
,
2003/11/17
Re: make error
,
Paul D. Smith
,
2003/11/17
Re: make error
,
spai
,
2003/11/18
Make error
,
spai
<=
Prev by Date:
win32 paths with spaces
Next by Date:
Make error (resend)
Previous by thread:
Re: make error
Next by thread:
ifneq gnumake bug
Index(es):
Date
Thread