Questions tagged [make]

The tool called "make" is a build manager which compares the last modification times of various files and performs user specified actions (commands) when the "target" files are found to be older than their dependencies.

Filter by
Sorted by
Tagged with
0 votes
2 answers
57 views

Makefile template

I have created a Makefile template file which I hope to be able to easily drop in to a folder and have useful targets ready. I am, however, not very familiar with ...
ZarakshR's user avatar
  • 135
1 vote
1 answer
62 views

Makefile: Include a generated-on-demand file

For the record, I'm writing according to the NEXT - Version 5 of Single Unix Specification, which is Issue 8 if you count the days when it was named XPG. In this new standard, a few new already-common-...
DannyNiu's user avatar
  • 310
5 votes
2 answers
529 views

CSV to TSV converter in C+yacc+lex and a Makefile

This is Comma-Separated Values to Tab-Separated Values converter written in C, with yacc(1) and lex(1). I'm remembering how to use yacc (the first (and last) time I used it was while reading «The UNIX ...
CancelVanDePaar's user avatar
2 votes
1 answer
170 views

Makefile that compiles to two separate executables

I'm working on a project that will have both a server and a client, using Boost's ASIO library for networking. I'm not really comfortable working with Makefiles, but, with some help from Chase Lambert'...
Spiwocoal's user avatar
1 vote
1 answer
120 views

Optimization of General Purpose Makefile

I wrote a makefile that would generate a simple executable from the example directory structure. project/ source/ include/ makefile The makefile itself comes ...
user avatar
7 votes
2 answers
739 views

std::vector<bool> workaround in C++

I've been trying to make an std::vector of boolean values and I got fed up with the specialization. To get around this, I made a wrapper class around ...
S.S. Anne's user avatar
  • 1,706
3 votes
2 answers
197 views

Generic makefile for C++ projects

Looking at back at the C++ projects I've developed, the Makefiles are a mess. To tell you the truth, I copied one a long time ago and basically have been cutting and pasting it haphazardly ever since....
Jaldhar's user avatar
  • 409
1 vote
0 answers
88 views

Compiling dependency files: Linker Warning [closed]

I adapted a makefile to re-compile for changed header files by generating a list of dependencies. The code framework already existed and all I had to do was adding a little bit of code for the ...
Spacefish's user avatar
  • 121
2 votes
0 answers
119 views

Makefile for a document generation system

This is my first shot at writing a makefile for a document generation system. Please identify any more ways to refine it. Some pointers on how it works: The INPUT files initially are templates to be ...
KevinRethwisch's user avatar
1 vote
1 answer
66 views

Understand the dependency levels of makefiles

Assume that the project has the following files, where the first files is dependent on the files under it's category in the unordered list: main.c global.h (contains enumerations and #define ...
3N4N's user avatar
  • 111
1 vote
0 answers
88 views

Building a lot of individual programs from one Makefile

I have written a non-recursive Makefile that almost does the job I want. Apart from not full-fillng all my goals it doesn't look good. There should ways to solve the issues and also to improve/clean ...
rAAbert's user avatar
  • 11
4 votes
0 answers
44 views

Make stylesheets, with automatic dependency tracking

This is a revision of the code posted here. It's a Makefile that I want to use for compiling Sass files to CSS in web projects. For this, I typically have two folders ...
Oliver Scholz's user avatar
4 votes
1 answer
84 views

Standalone GNU Makefile tracking `@import` statements in Sass

The following is a (working) excerpt from the Makefile I want to use in web projects. I wanted this Makefile to contain all the necessary code and not rely on other self-written files. Partly, because ...
Oliver Scholz's user avatar
4 votes
1 answer
124 views

GNU Make variable relationship graph using Python

This program runs through a preprocessed makefile (make --print-data-base | python make_graph.py [options]) to assemble a directed graph of its variables. I ...
Caterpillar's user avatar
1 vote
0 answers
187 views

Rules and targets in a makefile for data science in R

I am analysing some data (from bioinformatics) with R scripts. I created my first makefile to be able to redo them easily. There is a Figures folder in the root folder and for each analysis a folder ...
llrs's user avatar
  • 273
4 votes
1 answer
411 views

Pandoc builder system

I have created a GNUMake building system for pandoc. It has grown quite a bit, I wonder if I can optimize it further. Would it be possible, for instance, that it only runs a target if the output hasn'...
lf_araujo's user avatar
  • 145
3 votes
0 answers
67 views

Using GNU make for a build system without hand-written rules

For my own projects, I regularly use GNU make and often had the same requirements like It should work in windows cmd as well as in a *nix shell It should work for ...
Felix Palmen's user avatar
2 votes
1 answer
247 views

GNU Makefile for google benchmark

I've decided to write a common Makefile for Google benchmark library. You could say I could have taken generated Makefile, but it's not appropriate solution (or maybe I'm wrong?). ...
c4pQ's user avatar
  • 135
2 votes
1 answer
2k views

Makefile and object file directory

Ok this is the first makefile I've ever written. I it works and that's about it. Things that I was wondering if if I can specify where the object files go. It looks really bad with all the .o files ...
Swluo's user avatar
  • 153
6 votes
1 answer
80 views

Automake for an S/KEY implementation

I've been tasked with giving a legacy codebase some love. The actual code is written in C, but is not very relevant aside from the #includes each file makes. No, ...
JesseTG's user avatar
  • 459
2 votes
1 answer
135 views

Makefile and main header file for a shell

My main.c includes this header file. Please let me know how I can improve it. I did my best but I don't know much about code conventions in C (I come from Java and ...
Niklas Rosencrantz's user avatar
2 votes
0 answers
166 views

Non-recursive make script

I am trying to make an easy-to-use non-recursive make script that works with several directories. Everything is packed here.: Directory structure ...
Nick's user avatar
  • 1,490
4 votes
2 answers
3k views

Makefile to build and debug a C++ console app

I had to create this makefile to build and debug a C++ console app. I just need some hints and tips on how I can organize my makefile. ...
NinjaDeveloper's user avatar
5 votes
2 answers
514 views

Makefile for a x86 operating system in C++

I recently had submitted my bashscript for building an OS for review and got valuable feedback, so I rewrote the entire script for a makefile: Makefile ...
aswin mohan's user avatar
11 votes
1 answer
249 views

Makefile for a custom operating system kernel

I'm now posting the second semi-complete part of my operating system makefile. The kernel itself is currently incomplete, so don't be surprised by the small size of the makefile. When the kernel ...
u185619's user avatar
  • 805
7 votes
2 answers
3k views

A basic, modern, idiomatic GNU makefile

I have prepared a small makefile for a small project, but I am trying to find what would be the best practices; up to now I have gathered these: relatively idiomatic (typical structures, flows, var ...
hmijail's user avatar
  • 173
6 votes
3 answers
500 views

Built-in help in a Makefile

My colleagues often ask me, "Dude could you remind me what I have to type to build this target?". So I eventually implemented a nice workaround in my Makefiles. I wanted my Makefiles to have a help ...
nowox's user avatar
  • 975
2 votes
1 answer
59 views

Slicing and dicing images for Google Play

Making an Android app involves making a lot of images of various sizes: The app's launcher icon, in high/low/medium resolution Buttons, menu buttons, if any, in high/low/medium resolution Images for ...
janos's user avatar
  • 111k
8 votes
2 answers
7k views

Makefile and directory structure

I am looking for improvements for this basic makefile and directory structure. I know this is overkill and could be compiled with one line in a flat directory structure, but I want to use this as a ...
rileymat's user avatar
  • 183
2 votes
1 answer
459 views

Makefile for automatically processing image files

I have a Makefile that is used to automatically process some image files. The basic idea behind this is copy everything from col-noborder and ...
vwegert's user avatar
  • 125
3 votes
2 answers
5k views

Optimize a Makefile

Since my project is getting bigger every day and I am just a starter in the wonderful world of makefiles, I need some help improving mine because, although it works (almost) as I wish, it really ...
makeMonday's user avatar
7 votes
1 answer
134 views

Coverage processing on multiple Java projects with gmake

As part of my data collection, I have to run multiple kinds of coverage processing on multiple Java projects. Below is my main Makefile intented only for gmake. ...
Rahul Gopinath's user avatar
3 votes
1 answer
191 views

Cleaning multiple build directories

I'm cleaning build directories produced by GNOME build tool, JHBuild. This tool either downloads tarballs or clones git repositories, depending on set-up. After that, it proceeds to compilation (and ...
tshepang's user avatar
  • 742