I need to add some capabilities to very complex, multi-layered makefile (lots of include files, lots of targets, lots of variables) that was written by someone else who of course is no longer with the company. There are some folks here who understand some of it, but not the whole thing.
Is there a Make debugger where I can single-step ...
Hello,
I've found something for compiling text file as string variable:
Code:
objcopy --input binary --output elf64-x86-64 --binary-architecture i386 test.txt test.o
and i want to do it for each ./included_text/*.abc and then each of these files link.
I've find pre/post build steps but i can't find anything which will help me. Or you...
I have a find command that I would like to sort such that entries for certain directories are sorted last. The reason is that this list is to be passed to etags to create a tags table and I would like certain third-party tool directories to be after all the code I actively edit.
Can someone suggest a good easy way in to sort the list a...
If I run make then how can I tell if gcc or g++ is being used? I tried to look at the Makefile but didn't find anything.
Here is the output from make. I can't figure it out from this either.
cd threads; make depend
make[1]: Entering directory `/home/anthony/nachos-4.0/code/threads'
g++ -I../lib -I../threads -I../machine -DTHREADS -Dx86...
In Linux I am trying to compile something that uses the -fwritable-strings option. Apparently this is a gcc option that doesn't work in newer version of gcc. I installed gcc-3.4 on my system, but I think the newer version is still being used because I'm still get the error that says it can't recognize the command line option -fwritable-s...
I am trying to force make file to display next string:
"Please execute next commands:
setenv PATH /usr/local/greenhills/mips5/linux86:$PATH"
The problem is with "$PATH". Command
@echo "setenv PATH /usr/local/greenhills/mips5/linux86:$PATH"
cause a result
"setenv PATH /usr/local/greenhills/mips5/linux86:ATH"
any combinations of e...
This is my current makefile.
CXX = g++
CXXFLAGS = -Wall -O3
LDFLAGS =
TARGET = testcpp
SRCS = main.cpp object.cpp foo.cpp
OBJS = $(SRCS:.cpp=.o)
DEPS = $(SRCS:.cpp=.d)
.PHONY: clean all
all: $(TARGET)
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJS) -o $(TARGET)
.cpp.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
%...
Hi all,
I've just downloaded Eclipse CDT developer kit (87MB) for Windows. I've also installed MinGW, and msys.
I also added this to PATH: C:\msys\1.0\bin;C:\mingw\bin. and restarted computer after that. I've checked by type "make --version" in cmd and it works.
However, for some reason I cannot compile my C project. I don't get bi...
hi i want to do a Makefile in linux that will take all the .cpp files in the dir compile them
and create one .o file that i can active how i can do it with Implicit Rules
thanks
mati
...
Hello,
I have an issue. I have defined in C file, read-line.c, a function print, like this:
void history_print(void)
{
/* some stuff */
}
In a C++ file, command.cc, I have the following:
extern "C" void history_print(void);
and then I simply call history_print().
#Use GNU compiler
cc = gcc -g
CC = g++ -g
all: shell
tty-r...
I'm struggling to write Makefiles that properly build my unit tests. As an example, suppose the file structure looks like this
src/foo.cpp
src/foo.hpp
src/main.cpp
tests/test_foo.cpp
tests/test_all.cpp
So, to build the executable test_all, I'd need to build test_foo.o which in turn depends on test_foo.cpp but also on src/foo.o.
What...
I'm running the Terminal through Snow Leopard (with the developer packages, which contain missing gnu components). Upon attempting to run the makefile to build SWI-Prolog, this is what I get:
bin/i386-darwin10.4.0/swipl -f none -O -o boot32.prc -b boot/init.pl
Loading boot file ...
Loading Prolog startup files
% messages boot compiled ...
In a makefile, I'd like to define a variable specifying whether the current redhat-release is greater than 5.3. (This variable will be passed to gcc as a #define)
So far I've come up with:
# Find out which version of Red-Hat we're running
RH_VER_NUM = $(shell /bin/grep -o [0-9].[0-9] /etc/redhat-release)
RH_GT_5_3 = $RH_VER_NUM > '5.3'...
I'm observing an interesting behavior of make and I wonder if there is a reasonable explanation to it besides a bug in gmake.
Let's say we have the following in makefile:
%-animal:
echo "$* is an animal"
%-fox: %-fox-animal
%-wolf: %-wolf-animal
The difference between the last two targets is that "%-wolf" does not have any ...
Hi,
Can we open a new terminal tab or window from the existing terminal using a makefile or some c file.
If yes how? Thanks in advance for replying.
P.S. I want to do this because first in the terminal I want to run the server file then I want to open the new terminal and there run the file for the client.
From the second terminal I ...
I have the following code inside a Makefile:
# Root Path
echo "What is the root directory of your webserver? Eg. ~/Server/htdocs" ;
read root_path ;
echo $root_path ;
if [ ! -d $root_path ] ; then \
echo "Error: Could not find that location!" ; exit 1 ; \
fi
However when typing anything (eg. "asd") this is what gets returned:
Wha...
My projects almst always consist of:
1- Pairs of Foo.h and Foo.cpp
2- Some extra headers util.h etc.
What is the simplest way to write a makefile that
a-runs
$CC -c foo.cpp
for each .cpp file, keeping a dependency to its coresponding .h file
b- provides some way that I can manually add extra dependencies
c-includes a linking s...
Hey everyone,
I'm trying to compile a C++ library (VRPN) with a couple of Java wrappers to be used in an Android app. Using the ndk-build command, I get an "undefined reference" error for the first line of my C++ interface file which references a constructor for an object in the library. I am fairly sure my code is correct - the call ...
If I erase the gcc lines from this file shouldn't it take compilation as the implicit rule? Why isn't it allowing me to run the program ./calc with that makefile configuration?
Makefile:
all: calc
clean:
rm -rf calc arit.o calc.o
calc: calc.o arit.o
#gcc -o calc calc.o arit.o
calc.o: calc.c arit.h
#gcc -c calc.c
a...
This is the first time I am writing a makefile. This doesn't work (for example, if I modify ClientSocket.cc it just says "uptodate". Also throws up lots of dependency errors if I run make myprog). Can you please tell what is wrong in this?
Thank you
myprog: myprog.o Client.o ClientSocket.o Socket.o
g++ -Wall -g Socket.o Clien...