In simple words the error means there are two main functions since you have included file1.c twice here
What you can do to solve your problem is build two object files mathfun1.o and file1.o and build the executable "file1" including both these object files. Your makefile would look something like this
Regards,
Harish J
Hello there,
Thank you very much for your attention to my question. In fact this was the source of the problem. Here is therefore the new version of Makefile
And everything works pretty well now.
I am running a make file through the gnu make tool and i am getting the following error
jsh1035c:/users/egate453/admegate/kapil/samples $ make -f GNUmakefile queue_c
make -f ./GNUmakefile queue_c in_objdir=1 build_root=/users/egate453/admegate/kapil/samples
make: Entering directory... (2 Replies)
Hi,
This stems from the following thread https://www.unix.com/showthread.php?t=18299
I have a makefile which makes either executables or a shared library.
i.e. make -f unix.mak will create the executables and
make -f unix.mak libolsv will create the shared library.
Since these have to be... (4 Replies)
Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:
make: module: command not found
Why is this? Is there any way to run this command in a Makefile?
NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
I want to run a target defined in a shell script. The shell script name is 'ua.sc' and the target in it is 'N' i.e. (ua N) throught a makefile. How can i do it so that i can run it with a make target. (3 Replies)
I am trying to create a makefile to build a program and am getting the following error:
make -f tsimplex.mk
make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop.
OPSYS = $(shell uname -s )
TARGET = tsimplex
ROOTDIR = ../../..
GTSDIR =... (1 Reply)
I've created a tag in the makefile:
mytag: $(shell ${PWD}/script.sh)
When i do: make clean - the script is executed
When i perform make or make mytag the script is again executed with the output:
make: Nothing to be done for mytag
What i want ?
I want script.sh to be executed only... (0 Replies)
I am new to Solaris and compilation using make files.
I have a code base which is organized into different folders. At the root folder is a master make file and in the sub directories, there are make files for that particular folder.
In the make files present in subdirectories, I am seeing... (2 Replies)
I have a make file for C program, which always gives the error
ld: 0711-738 ERROR: Input file ../src/file_name.o
XCOFF32 object files are not allowed in 64 mode
Does anybody know the problem?
Thanks for contribution (2 Replies)
Hello,
My makefiles are set up to generate an environment specific build directory based on the local configuration and some values passed to make. It generally looks like,
# compilers, may be passed to make
CC++ = g++
FCOMP = gfortran
# version of program, may be passed to make
ver =... (4 Replies)
Discussion started by: LMHmedchem
4 Replies
LEARN ABOUT DEBIAN
jmkmf
JMKMF(1) General Commands Manual JMKMF(1)NAME
jmkmf - runs jmake with the correct options
SYNOPSIS
jmkmf [ top-level dir [ current dir ] ]
DESCRIPTION
Jmkmf is a wrapper which calls jmake with the correct options, defining the symbols TOPDIR (location of the top-level directory) and CURDIR
(current directory). The generated Makefile.SH is then ran through /bin/sh to produce a Makefile.
Jmkmf is useful when you generate a makefile for the first time.
When ran without arguments, jmkmf will scan the directories upwards, looking for a .package file marking the top of your sources. It will
then derive the top-level directory and the name of the current directory by itself.
Once you have a Makefile.SH generated by jmake, and have run Configure already, you can use make Makefile.SH to build the Makefile.SH again
and make Makefile to run the Makefile.SH through /bin/sh. To use the recursive commands, you have to append an 's' at the end of the name
as in make Makefiles.SH and make Makefiles.
AUTHOR
Raphael Manfredi <ram@hptnos02.grenoble.hp.com>
FILES
Jmakefile High level description of makefile
The file marking the top of your package tree
SEE ALSO jmake(1), packinit(1).
ram JMKMF(1)