makefile

compile with -fPIC option but the option it is already in the makefile

Hello I get this error whem I am trying to do the make: relocation R_X86_64_32 against `vtable for Torch::MemoryDataSet' can not be used when making a shared object; recompile with -fPIC It says that I should recompile with the -fPIC option, I do that adding the -fPIC option to CFLAGS and CXXFLAGS but I still get the same error, any w...

Clrdump (C++) error LNK2019: unresolved external symbol __imp__RegisterFilter@8 referenced in function _main

I am using a makefile system with the pvcs compiler (using Microsoft Visual C++, 2008 compiler) and I am getting several link errors of the form: error LNK2019: unresolved external symbol __imp__RegisterFilter@8 referenced in function _main This is happening DESPITE using the extern "C" declaration, viz.: extern "C" int CLRDUMP_AP...

Adding a directory for the headers in a Makefile

Hello I would like to ask you, If someone knows how can I add a directory for the header files in the Makefile to avoid the error *.h not found, I have tried this option but does not work: INC_PATH := -I /directory/to/add ...

How to arrange a Makefile to compile a kernel module with multiple .c files?

How to arrange a Makefile to compile a kernel module with multiple .c files? Here is my current Makefile. It was auto generated by KDevelop TARGET = nlb-driver OBJS = nlb-driver.o MDIR = drivers/misc EXTRA_CFLAGS = -DEXPORT_SYMTAB CURRENT = $(shell uname -r) KDIR = /lib/modules/$(CURRENT)/build PWD = $(shell pwd) DEST = /lib/modules/$...

Building Xcode Projects From the Command Line

I've been playing around with Qt for a few hours now. I found that qmake produces Xcode project files on Mac OS X instead of good ol' makefiles. I don't want to launch Xcode every time I want to build "Hello, world". How do I make qmake generate regular makefiles or, if that's something that cannot be done on the Mac, how do I compile ....

Any interesting uses of Makefiles to share?

"make" is not only useful for building your programming project, but it seems to be under-used in other areas. For example, many shell scripts can be rewritten as Makefiles to allow independent parts to run in parallel (with "make -jXX") to keep all your CPU cores busy, with the explicitly declared dependencies as an added benefit in ca...

Workflow automation: Makefile vs. Ant

Whenever I notice that something in my workflow is a repeating task, I try to automate it. For example the steps necessary to deploy something on a server. It's often a build, followed by a scp and finally some remote setup scripts: mvn package scp target/foobar.jar server: ssh server install-foobar ssh server './bin/foobar restart' ...

Why library name gets an additional 0 in its name?

I have this tiny Qt project with a project file like this: TEMPLATE = lib TARGET = record32 VERSION = 0.0.1 DEPENDPATH += . INCLUDEPATH += . CONFIG += shared SOURCES += recorder.cpp HEADERS += recorder.h When I compile a library from it by qmake && nmake, it results into files record32.obj record320.lib record320.dll ... Why is th...

Call cmake from make to create Makefiles?

I am using cmake to build my project. For UNIX, I would like to type make from my project's root directory, and have cmake invoked to create the proper Makefiles (if they don't exist yet) and then build my project. I would like the cmake "internal" files (object files, cmake internal Makefiles, etc.) to be hidden (e.g. put in a .build ...

What's the best way to move a directory into place in a Makefile install?

I'm currently using the usual technique in my Makefile to install individual files: install: install -D executable ${BIN_DIR} But I just ran across a situation where I need to move a whole directory and all files underneath it into place. Is cp -r the best way or is there a more linux-y/unix-y way to do this? ...

C makefile to compile OpenGL project directly on iphone

Please direct me if this question has already been asked; I did a search on the topic unable to find yet. I am having trouble putting together a makefile that will take one or more .c OpenGL project files, uses apple-arm-darwin9 and OpenGL framework to compile into object directly on the iphone (using bash). For some reason whatever com...

All .cpp files depend on two .h files?

In a makefile, I have the following line: helper.cpp: dtds.h Which ensures that helper.cpp is rebuilt whenever dtds.h is changed. However, I want ALL files in the project to be rebuilt if either of two other header files change, kind like this: *.cpp: h1.h h2.h Obviously that won't work, but I don't know the right way to get nmake ...

Visual Studio to Make

While I love the Unix toolset family(including its black sheep Make) the project I'm working on currently is cross platform. That means having a Visual studio project ready for build. So my question is, is there a tool/plugin for importing a Make file into VS or conversely is there a way to export a visual studio project into Make? Or a...

How to compile a simple Qt and c++ application using g++ on mac os x?

I am trying to use Qt for a project in school but am running into problems. I started following the tutorials and I am running into Makefile problems. Most of the tutorials say to run qmake -project, then qmake and finally make. But when I try this I run into the error make: *** No targets specified and no makefile found. Stop. I dont k...

How can I use this makefile in Microsoft VC?

In the program below, there are two things that I don't understand. How can I use this makefile in Microsoft VC? Why there is a '?' before '='? Program: ifeq ($(TARGET_COMPILER),ms) include ../makefile.ms.config DBG?= /Zi OPT= /Ox CXXFLAGS += $(COMMON_FLAGS) $(OPT) $(DBG) EEXT = $(EXT).dll ifeq ($(GZ...

What does "No file names given" mean as a make error?

I'm trying to build a makefile and after about 5 seconds, I get this error: "No files names given". what does it mean and how do I fix it? [exec] Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland [exec] Error E2266: No file names given [exec] ** error 1 ** deleting paslib.lib This is being run from a BPG file with the opti...

Makefile variable assignment

Can anybody give a clear explanation of how variable assignment really works in Makefiles. What is the difference between : VARIABLE = value VARIABLE ?= value VARIABLE := value VARIABLE += value I have read the section in GNU Make's manual, but it still doesn't make sense to me. Thanks ...

Make/makefile progress indication!

Look at this makefile, it has some sort of primitive progress indication (could have been a progress bar). Please give me suggestions/comments on it! # BUILD is initially undefined ifndef BUILD # max equals 256 x's sixteen := x x x x x x x x x x x x x x x x MAX := $(foreach x,$(sixteen),$(sixteen)) # T estimates how many targets ...

In Unix, can I run 'make' in a directory without cd'ing to that directory first?

In Unix, can I run 'make' in a directory without cd'ing to that directory first? ...

problem using cat in windows

I'm using the windowsxp. The version of 'cat' that I'm using comes bundled with the arduino download. The makefile runs cat. Here is the output: cat \arduino-0012\hardware\cores\arduino\main.cxx >> applet\foo.cpp cat: arduino-0012hardwarecoresarduinomain.cxx: No such file or directory make: *** [applet_files] Error 1 I also tried t...