Questions tagged [makefile]

Questions relating to makefiles, (The file that contains the instructions for make)

180 questions
57
votes
3 answers

How do I set up ccache?

I want to use ccache to speed up compilation. I came across How do I enable ccache?. This is what I have done so far: $ sudo apt-get install -y ccache $ dpkg -l ccache ii ccache 3.1.6-1 Compiler cache for fast recompilation of C/C++ code $…
29
votes
1 answer

What does "./configure; make; make install" do?

What does ./configure do? Why make then make install? How does it know where libs are? ( they are all there and loaded but it cant find them.) Why need libs if compiler is supposed to compile?
david
  • 433
28
votes
6 answers

Error when installing Makefile: "make: *** No targets specified and no makefile found. Stop."

In short while I run the make command it says: nir@nir:~/Downloads/xf86-video-intel-2.17.0$ make make: *** No targets specified and no makefile found. Stop. I looked inside the folder-xf86-video-intel-2.17.0 and there is a file named…
yinon
  • 1,229
15
votes
1 answer

How to have Debian packaging generate two packages given an upstream source archive?

I am packaging something for my PPA. The upstream source is a .tar.gz archive which is Makefile-based. Since this package has a significant amount of architecture-independent data, it would be wise to have the build scripts generate two…
Nathan Osman
  • 32,495
14
votes
1 answer

Detect if its Ubuntu Linux OS in Makefile

I want to create a makefile that will compile my objects and name them according to the Linux distro (e.g. Suse, RedHat, or Ubuntu). How can I detect if the OS is Ubuntu or not?
RRR
  • 265
14
votes
2 answers

Getting missing dependency for compilation glib-compile-schemas

I Downloaded empathy-3.0.1.tar.bz2 to install in Ubuntu 10.04 LTS. I ran the makefile and I got the error : configure: error: glib-compile-schemas not found. How can I fix this problem ? Please help me.
Subin
  • 760
  • 4
  • 16
  • 32
12
votes
1 answer

How to get Six (an old KDE game program) running in Kubuntu 20.04

Six was a gold-medal winner several times in a computer games olympiad. The source code is on GitHub https://github.com/melisgl/six/tree/master/six. It has been pinned for a couple of decades, but I would like to bring it up, however I'm not…
ForDummies
  • 555
  • 5
  • 16
11
votes
1 answer

Missing separator in makefile

I have next code in Makefile: CFLAGS=-Wall -g clean: rm -f ex1 When I run "make clean" I receive next error: Makefile:4: * missing separator. Stop. Why? How I can fix it?
10
votes
3 answers

How to clean executable using make clean?

After compiling several *.c and *.h files using make, I cleaned up the object files using make clean. However I don't know how to remove the executable. my makefile code --> CC=gcc CFLAGS=-I. mp1: main.o downloader.o json.o …
10
votes
3 answers

My makefile results in: No rule to make target `arch/x86/tools/relocs.c', needed

I am using Ubuntu 12.04. I wrote a simple hello world kernel module (hello.c). I wrote the folllowing makefile for it: obj-m+=hello.o KDIR:= /usr/src/linux-headers-3.2.0-24-generic-pae all: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules clean: …
AvinashK
  • 421
9
votes
4 answers

Writing a "Hello World" Device Driver for kernel 2.6 using Eclipse

Goal I am trying to write a simple device driver on Ubuntu. I want to do this using Eclipse (or a better IDE that is suitable for driver programming). Here is the code: #include static int __init hello_world( void ) { printk(…
Isaac
  • 193
9
votes
3 answers

What is a makefile exactly and how we can create one?

I know this is a silly question, but since I am trying so hard to learn linux by myself, I need some help from you fellows. I found this task on the internet and I am trying to solve it but I don't understand exactly how can I use makefiles in…
Adrian George
  • 3,671
  • 8
  • 24
  • 30
8
votes
1 answer

Using makefile wildcard command for file names with spaces

I have a makefile that I use to compress pictures: src=$(wildcard Photos/*.jpg) $(wildcard Photos/*.JPG) out=$(subst Photos,Compressed,$(src)) all : $(out) clean: @rmdir -r Compressed Compressed: @mkdir Compressed Compressed/%.jpg:…
iBelieve
  • 5,434
8
votes
2 answers

Which file is changed after I do "make menuconfig"?

In linux, I thought that the file Makefile is changed after I run make menuconfig. But when I diff Makefile, I don't see any difference. Which file is changed after I do make menuconfig?
7
votes
2 answers

Bash is abnormal in Makefile!

all, I have found that the same Makefile works well in Mac OS X, but does not work in Ubuntu. The snippet is as following: start: @echo $(seperator) @if [[ "$(PROJECT)" == "" ]]; then \ echo " Project powered by CodeMate!"; \ …
Li Dong
  • 173
1
2 3
11 12