Sponsored Content
Full Discussion: Error with Make File
Top Forums Programming Error with Make File Post 302410554 by niranjanvg on Tuesday 6th of April 2010 09:29:27 AM
Old 04-06-2010
Question Error with Make File

Hi All,

I am using GNU Make and i have a peculiar kind of error, i am not able to understand, Firstly have a look at the make file used by me


Code:
CFLAGS=-c -Wall
CC=gcc
.PHONY:clean
OBJ=./obj
SRC=./src
INC=./inc
exec: $(OBJ)/*.o
    $(CC) $^ -o $@ 
%.o: $(SRC)/*.c
    $(CC) $(CFLAGS) $^ -I$(INC)
    mv *.o $(OBJ)
clean:
    rm -f $(OBJ)/*.o exec


as for as my knowledge goes it is correct, and it execute properly, but the problem is when i change some of my code, and rerun make, it throws a error as below,
Code:
gcc -c -Wall src/main.c src/read.c -I./inc
mv *.o ./obj
gcc   makefile.o   -o makefile
gcc: makefile.o: No such file or directory
gcc: no input files
make: *** [makefile] Error 1

I tried a lot of things but not able to understand why it is happening, if i open the make file and save it, then it works properly, or in other words, if make file is the last one to be edited or it is the one having the latest time stamp than any other file then it is ok, or else it gives an error as above, Kindly help me understand where have i gone wrong in writing the make file.

Thanks & Regards,

Niranjan

Last edited by pludi; 04-06-2010 at 10:38 AM.. Reason: code tags, please...
 

10 More Discussions You Might Find Interesting

1. Programming

Error when running make

Hi , I get the following error when i run the make command. cc -Aa -DUNIX -osrcmpmn srcmpmn.c crt0: ERROR couldn't open /usr/lib/dld.sl errno:000000014 *** Error exit code 14 here the file is C program which has been modified. Please help. (1 Reply)
Discussion started by: shashidhara_01
1 Replies

2. Programming

Error while running C++ make file

The problem is that the original program was compiled using v5.0 MQ client but now we are using MQ client v5.3. Had modified the "make file" options as follows but still i could see the errors. #CLIENT_V5_LIBS = -limqb23ss -limqc23ss -lmqic -lmqmcs -lnsl -ldl CLIENT_V5.3_LIBS =... (1 Reply)
Discussion started by: hram
1 Replies

3. Linux

Error in issuing a make and make install

Hi, Recently I install a package and try to do a make and make install. However, in the make it gives me below error:- make:Nothing to be done for 'install-exec-am' make:Nothing to be done for 'install-data-am' Can anyone please explain to me what does this mean? I have been trying... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

4. Solaris

Gani Network Driver Won't Install - make: Fatal error: Don't know how to make targ...

I attached a README file that I will refer to. I successfully completed everything in the README file until step 4. # pwd /gani/gani-2.4.4 # ls COPYING Makefile.macros gem.c Makefile Makefile.sparc_gcc gem.h Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies

5. Programming

makeutility: how to get the make-file name inside of the make-file?

How I can get the current make-file name in a make-file So, if I run make with specified file:make -f target.mak is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Discussion started by: alex_5161
2 Replies

6. Programming

Make error

Hello, Is someone know why this generate an error : all: dt = $(shell date) echo "$(dt)" (5 Replies)
Discussion started by: X-Or
5 Replies

7. Shell Programming and Scripting

Make file error

I am new to using make command and I keep getting this error time and again please help me Make file is as follows #ARCH := $(shell uname)# # ifeq ($(ARCH), SunOS) DEFINES = -KPIC -DSVR4 -DSOLARIS -DSYSV -D__svr4 -D__svr4__\ -D_REENTRANT -DSOLARIS2_5 -D_SVID_GETTOD -DXP_UNIX -UDEBUG... (1 Reply)
Discussion started by: c.operatingsys
1 Replies

8. Linux

Error when using make file.

hello, i want to execute hello world using cross compiler ppc_4xx-gcc. i have this makefile: CC= $(shell which ppc_4xx-gcc) #CC=g++ CXXFLAGS=-cpp -Wall LDFLAGS= SOURCES=main.cpp hello.h OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=hello all: $(SOURCES)... (5 Replies)
Discussion started by: walidaydi
5 Replies

9. UNIX Desktop Questions & Answers

Gtkmm Make Then Error

I would like to install gtkmm-2.0.1 on solaris 10 platform. To install, I have a dependency libsigc++1.2 successfully install. I can type ./configure without any error. But when I typed make I got the following error. I am newbie who cannot understand the error. Have no idea how to solve... (0 Replies)
Discussion started by: nirin
0 Replies

10. Shell Programming and Scripting

error while executing make file

hi i am facing a strange error... whenever i try to execute make file it gives the following error bash-3.00$ make usa0300uz1128 sh: syntax error at line 1: `end of file' unexpected mksh: Fatal error: The command `if ; then echo "${COMMON}/src/rules/rules_11.2.0.3.2012Q3"; elif... (1 Reply)
Discussion started by: aishsimplesweet
1 Replies
cups-driverd(8) 						    Apple Inc.							   cups-driverd(8)

NAME
cups-driverd - cups driver daemon SYNOPSIS
cups-driverd cat ppd-name cups-driverd list request_id limit options DESCRIPTION
cups-driverd shows or lists PPD files. It is run in response to CUPS-Add-Modify-Printer or CUPS-Get-Devices requests. The first form ("cups-driverd cat ppd-name") writes the named PPD file to stdout. The output format is an uncompressed PPD file. The second form lists the available manufacturers or PPD files to stdout as indicated by the options argument. The output format is an IPP response message. The request_id argument is the request ID from the original IPP request, typically 1. The limit argument is the limit value from the original IPP request - 0 means no limit. Finally, the options argument is a space-delimited list of attributes ("name=value name=value ...") that were passed in with the request. Currently cups-driverd looks for the ppd-make and requested-attributes attributes and tailors the output accordingly. DRIVERS
Drivers can be static PPD files under the /usr/share/cups/model directory or programs under the /usr/lib/cups/driver directory. Static PPD files must conform to the Adobe PPD File Format Specification version 4.3 and may be compressed using the gzip(1) program. Driver programs must implement the command-line interface shown in the next section. DRIVER PROGRAMS Driver programs provide a interface to dynamically-generated PPD files. The following arguments are currently defined: drivername list Lists the supported PPD files to stdout. drivername cat ppdname Writes the named PPD file to stdout. Driver programs MUST NOT query hardware or make other long-term operations that would delay the return of a driver list. See the NOTES sec- tion below for specific recommendations. LISTING FILES (drivername list) When run with the single argument "list", the program must list the available PPD files it can generate to stdout using the following for- mat: "drivername:ppdname" language "make" "make and model" "drivername:ppdname" language "make" "make and model" "1284 device id" "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)" "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)" "PostScript version" "drivername:ppdname" language "make" "make and model" "1284 device id" "(PPD product)" "PostScript version" "type" Drivername is the name of the driver program. Ppdname is the name used to select the given driver. Language is the locale associated with the default language of the PPD file, typically "en". Make is the Manufacturer name from the PPD file. Make and model is the NickName name from the PPD file. 1284 device id is the 1284DeviceId from the PPD file, if any. (PPD product) is the Product string as it would appear in the PPD file or from a PostScript query. PostScript version is the PSVersion string as it would appear in the PPD file or from a PostScript query. Type is "postscript" for PostScript printers, "pdf" for PDF printers, "raster" for raster printers, or "fax" for facsimile devices. WRITING FILES (drivername cat ppdname) When the driver program is run with the "cat ppdname" arguments, it must write the named PPD file to stdout, uncompressed. If the named PPD file does not exist, the driver program must not write any output to stdout and report the error to stderr instead. DRIVER ERROR MESSAGES Error messages can be relayed back to cupsd by writing them to stderr. The following prefixes are recognized: DEBUG: [drivername] Debugging messages ERROR: [drivername] Error messages INFO: [drivername] Informational messages NOTES
Due to performance considerations, driver programs have been officially deprecated and should not be used for new development. Currently only the CUPS web interface and lpinfo(8) command will request lists from all driver programs. SEE ALSO
cupsd(8), cupsd.conf(5), cupstestppd(1), lpinfo(8), http://localhost:631/help COPYRIGHT
Copyright 2007-2011 by Apple Inc. 6 January 2011 CUPS cups-driverd(8)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy