Search Results

Search found 659 results on 27 pages for 'makefile'.

Page 7/27 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Build multiple sources into multiple targets in a directory

    - by Taschetto
    folks. I'm learning about GNU-Make and I have the following project structure: ~/projects /sysCalls ex1.c ex2.c ex3.c ex4.c ex5.c ex6.c ex7.c Each .c source is very simple, has its own main function and must be built into a corresponding binary (preferably named after its source). But I want to build into a bin directory (added to my .gitignore file). My current Makefile is: CC := gcc CFLAGS := -Wall -g SRC := $(wildcard *.c) TARGET := $(SRC:.c=) all: bin $(TARGET) mv $(TARGET) bin/ bin: mkdir bin clean: rm -fr bin/ It works as expected, but always builds every source. And I don't like moving everything to bin "manually". Any tips or ideas on how this Makefile could be improved?

    Read the article

  • makefile from Linux doesn't work in OpenSolaris

    - by Alex Farber
    In OpenSolaris OS, when I run makefile generated by Eclipse CDT on the Linux OS, I get an error on the first -include line. The same error was in FreeBSD, and was solved by executing gmake instead of make. In OpenSolaris (just installed) gmake doesn't work (command not found). What package should I install and how exactly, to build Linux-generated C++ project in OpenSolaris?

    Read the article

  • Setting PATH in Makefile run by eclipse

    - by Chris Jefferson
    I have a Makefile which runs fine from a bash shell, but fails to run from Eclipse. This is because the path I am setting in my .bash_profile is not getting used. What is the best way of making this happen? Is there somewhere else I could put the path, to make sure it is invoked in non-interactive shells (which is I assume how eclipse is running make)?

    Read the article

  • why i failed to build rtorrent?

    - by hugemeow
    i am not root, so i have to build rtorrent from source and hope to install it in my home directory, but failed, why? [mirror@hugemeow rtorrent]$ ls AUTHORS autogen.sh ChangeLog configure.ac COPYING doc INSTALL Makefile.am NEWS rak README scripts src test [mirror@hugemeow rtorrent]$ ./autogen.sh aclocal... aclocal:configure.ac:7: warning: macro `AM_PATH_CPPUNIT' not found in library autoheader... libtoolize... using libtoolize automake... configure.ac: installing `./install-sh' configure.ac: installing `./missing' src/Makefile.am: installing `./depcomp' autoconf... configure.ac:7: error: possibly undefined macro: AM_PATH_CPPUNIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. though autoge failed, configure script is created. [mirror@hugemeow rtorrent]$ ls aclocal.m4 autogen.sh ChangeLog config.h.in configure COPYING doc install-sh Makefile.am missing rak scripts test AUTHORS autom4te.cache config.guess config.sub configure.ac depcomp INSTALL ltmain.sh Makefile.in NEWS README src run configure, and fail for syntax error near unexpected token `1.9.6', what's wrong? what i should do in order to build this rtorrent for my centos? [mirror@hugemeow rtorrent]$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes ./configure: line 2016: syntax error near unexpected token `1.9.6' ./configure: line 2016: `AM_PATH_CPPUNIT(1.9.6)' [mirror@hugemeow rtorrent]$ git branch * master [mirror@hugemeow rtorrent]$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/c++11 remotes/origin/master [mirror@hugemeow rtorrent]$ git tag 0.9.0 0.9.1 [mirror@hugemeow rtorrent]$ git clean -dfx Removing Makefile.in Removing aclocal.m4 Removing autom4te.cache/ Removing config.guess Removing config.h.in Removing config.log Removing config.sub Removing configure Removing depcomp Removing doc/Makefile.in Removing install-sh Removing ltmain.sh Removing missing Removing src/Makefile.in Removing src/core/Makefile.in Removing src/display/Makefile.in Removing src/input/Makefile.in Removing src/rpc/Makefile.in Removing src/ui/Makefile.in Removing src/utils/Makefile.in Removing test/Makefile.in Edit 1: details about libtool and libtools [mirror@hugemeow rtorrent]$ libtoolize --version libtoolize (GNU libtool) 1.5.22 Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [mirror@hugemeow rtorrent]$ libtool --version ltmain.sh (GNU libtool) 1.5.22 (1.1220.2.365 2005/12/18 22:14:06) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Read the article

  • F#, Linux and makefiles

    - by rwallace
    I intend to distribute an F# program as both binary and source so the user has the option of recompiling it if desired. On Windows, I understand how to do this: provide .fsproj and .sln files, which both Visual Studio and MSBuild can understand. On Linux, the traditional solution for C programs is a makefile. This depends on gcc being directly available, which it always is. The F# compiler can be installed on Linux and works under Mono, so that's fine so far. However, as far as I can tell, it doesn't create a scenario where fsc runs the compiler, instead the command is mono ...path.../fsc.exe. This is also fine, except I don't know what the path is going to be. So the full command to run the compiler in my case could be mono ~/FSharp-2.0.0.0/bin/fsc.exe types.fs tptp.fs main.fs -r FSharp.PowerPack.dll except that I'm not sure where fsc.exe will actually be located on the user's machine. Is there a way to find that out within a makefile, or would it be better to fall back on just explaining the above in the documentation and relying on the user to modify the command according to his setup?

    Read the article

  • Import C + Makefile into a linux IDE?

    - by Jessica
    I have a project for Linux that i've been developing for some time. Basically it's a bunch of C and H files together with a directory structure and a Makefile. Every time I need to debug something it's so painful, I need to manually search for var. definitions, structs, etc. Is there any good IDE out there for Linux that will allow me to import those files into a "project" and that will provide code completion or at least an easy way to get my bearings in the source code? thanks!

    Read the article

  • Makefile can not find boost libraries installed by macports

    - by user327502
    I just installed boost 1.42.0 from macports using sudo port install boost. Everything worked fine. Now I have a project that I'm trying to build using a makefile. Everything builds fine until it comes to the file that needs the boost library. It says: src/graph.h:20:42: error: boost/graph/adjacency_list.hpp: No such file or directory That file is actually located in two places: /opt/local/include/boost/graph/adjacency_list.hpp and /opt/local/var/macports/software/boost/1.42.0_0/opt/local/include/boost/graph/adjacency_list.hpp In the file src/graph.h where it's looking for boost/graph/adjacency_list.hpp, the include statement is here: #include<boost/graph/adjacency_list.hpp> How do I make this work?

    Read the article

  • Rails wont install at create Makefile stage

    - by mattc
    I am getting this error after running sudo gem install rails /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb creating Makefile make xcrun cc -I. - I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c generator.c xcrun: Error: failed to exec real xcrun. (No such file or directory) cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory i686-apple-darwin11-llvm-gcc-4.2: generator.o: No such file or directory lipo: can't figure out the architecture type of: /var/tmp//ccHCNNwM.out make: *** [generator.bundle] Error 1 I have Homebrew installed, Xcode 4.4 with command line tools installed, Osx 10.6.2 I run gem env and get this but not sure what I'm looking for: RubyGems Environment: - RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-12 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/matthewcleghorn/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ Any help greatly appreciated. Thanks.

    Read the article

  • More GCC link time issues: undefined reference to main

    - by vikramtheone
    Hi Guys, I'm writing software for a Cortex-A8 processor and I have to write some ARM assembly code to access specific registers. I'm making use of the gnu compilers and related tool chains, these tools are installed on the processor board(Freescale i.MX515) with Ubuntu. I make a connection to it from my host PC(Windows) using WinSCP and the PuTTY terminal. As usual I started with a simple C project having main.c and functions.s. I compile the main.c using GCC, assemble the functions.s using as and link the generated object files using once again GCC, but I get strange errors during this process. An important finding - Meanwhile, I found out that my assembly code may have some issues because when I individually assemble it using the command as -o functions.o functions.s and try running the generated functions.o using ./functions.o command, the bash shell is failing to recognize this file as an executable(on pressing tab functions.o is not getting selected/PuTTY is not highlighting the file). Can anyone suggest whats happening here? Are there any specific options I have to send, to GCC during the linking process? The errors I see are strange and beyond my understanding, I don't understand to what the GCC is referring. I'm pasting here the contents of main.c, functions.s, the Makefile and the list of errors. Help, please!!! Vikram main.c #include <stdio.h> #include <stdlib.h> int main(void) { puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */ return EXIT_SUCCESS; } functions.s * Main program */ .equ STACK_TOP, 0x20000800 .text .global _start .syntax unified _start: .word STACK_TOP, start .type start, function start: movs r0, #10 movs r1, #0 .end Makefile all: hello hello: main.o functions.o gcc -o main.o functions.o main.o: main.c gcc -c -mcpu=cortex-a8 main.c functions.o: functions.s as -mcpu=cortex-a8 -o functions.o functions.s Errors ubuntu@ubuntu-desktop:~/Documents/Project/Others/helloworld$ make gcc -c -mcpu=cortex-a8 main.c as -mcpu=cortex-a8 -o functions.o functions.s gcc -o main.o functions.o functions.o: In function `_start': (.text+0x0): multiple definition of `_start' /usr/lib/gcc/arm-linux-gnueabi/4.3.3/../../../crt1.o:init.c:(.text+0x0): first defined here /usr/lib/gcc/arm-linux-gnueabi/4.3.3/../../../crt1.o: In function `_start': init.c:(.text+0x30): undefined reference to `main' collect2: ld returned 1 exit status make: *** [hello] Error 1

    Read the article

  • How to run "make install" from Xcode

    - by teamon
    I have custom Makefile and External build target in Xcode. When I click "Build" it runs "make" When I click "Clear" it runs "make clean" How to run "make install" (or any other target) from Xcode? (btw, this is AVR project and xcode project file was created using avr-project tool shipped with Crosspack-AVR)

    Read the article

  • shell function and environment

    - by Michael
    How in Makefile export variable first then make another variable's expansion? somevar := apple export somevar update = $(shell perl -e 'print "$$ENV{somevar}"') all: @echo $(update) For some reason the expansion takes place first, then export. As a result the output is empty.

    Read the article

  • How to create dependencies in automake?

    - by Sam
    Hello, I have a Makefile.am file right now that looks like this: lib_LIBRARIES = foo.a foo_a_SOURCES = bar.F90 baz.F90 When compiled, bar.F90 gives bar.o. However, bar.F90 depends on several other Fortran files (cat.F90, dog.F90, pig.F90). I want to set up Automake to rebuild bar.o if the source of one of these dependencies change. I've been reading the GNU manuals for automake/autoconf and was unable to find a solution to this. Thanks for reading.

    Read the article

  • Build android project from command line

    - by zoli2k
    I would like to build and android project from command line on Linux. In the root directory of the project there are the following files and directories: AndroidManifest.xml build.xml default.properties res/ src/ Can you provide a sample Makefile how to build this project?

    Read the article

  • How do I add a .jar file to the compilation of .java files

    - by Christopher Schroeder
    My makefile is below Also, I would appreciate it if you told me how to move my .class files to ../bin/ JFLAGS = -cp JAR = "RSBot*.jar" JC = javac .SUFFIXES: .java .class .java.class: $(JC) $(JFLAGS) $(JAR) $*.java CLASSES = \ src/Banker.java \ src/Eater.java \ src/Fighter.java \ src/grotgui.java \ src/InventTab.java \ src/Looter.java \ src/Potter.java \ src/W8babyGrotworm.java \ src/Walker.java default: classes classes: $(CLASSES:.java=.class) clean: $(RM) *.class

    Read the article

  • Name for build option (for "make install") specifying where to install web application

    - by Jakub Narebski
    I want to provide 'install' target for Makefile for web application. I'd like to be able to install it, for example like described below: $ make install \ xxxdir=/var/www/cgi-bin (similarly to how one would use 'bindir' for ordinary programs, and 'mandir' / 'infodir' for documentation). Is there any standard (similar to autotools 'bindir', 'sharedir', etc.) for the name of 'xxxdir' variable in above example? How do you think should such build configuration variable be named?

    Read the article

  • make always rebuild

    - by fsdfa
    My Makefile is: OBJS = b.o c.o a.o FLAGS = -Wall -Werror CC = gcc test: $(OBJS) $(CC) $(FLAGS) $(OBJS) -o a b.o: b.c b.h $(CC) $(FLAGS) -c b.c a.o: a.c b.h c.h $(CC) $(FLAGS) -c a.c c.o: c.c c.h $(CC) $(FLAGS) -c c.c clean: rm a rm *.o all: test If I do make then make again, it always rebuilds 'test'. Why does it do this?

    Read the article

  • Build error while compiling Android source (JNI)

    - by arTsmarT
    I added some new functionality in C and when I try to build it, it gives me the following error: libnativehelper/include/nativehelper/JNIHelp.h:116: error: undefined reference to 'jniRegisterNativeMethods' error. I have included jnihelp.h in my C files. Is this a makefile related issue or am I missing something? LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_MODULE := newfile LOCAL_SRC_FILES := newfile.cpp include $(BUILD_SHARED_LIBRARY)

    Read the article

  • Making shared library from exist o-files

    - by Ockonal
    Hi guys, I have a project. I need in shared library of it to use in extensions. I don't want to make copy of this project but with shared-library settings. Are there any way to build it using *.o-files from building project? As I understand, I can write makefile for this.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >