NetLingua
Open source language textbooks
Home
Book guide
Tech guide
SourceForge.net Logo

This page describes the standard that all NetLingua makefiles must follow.

Which make?

I am currently using GNU Make 3.81. It just happens to be installed on my laptop. I guess any make will do just fine.

Why make?

Why not? I had to quickly set up the project and since make is everywhere…

Project structure

We have to follow up some standard to easily manage our projects.

This is how the typical root directory is going to look like:

drwxrwxr-x 6 david david 4096 May 18 20:27 cfg
-rw-rw-r-- 1 david david 1287 May 18 15:36 makefile
-rw-rw-r-- 1 david david 1473 May 18 16:36 readme.txt
drwxrwxr-x 4 david david 4096 May 18 20:29 out
drwxrwxr-x 4 david david 4096 May 18 20:27 src
cfg

This is where all the configuartion files live.

src

Here we have all the sources of the project.

out

This directory is created by make all. This is where the final artifacs are put.

readme.txt

Notes for the project.

makefile

Makefile used to build the project.

Compulsory targets

Every NetLingua makefile must define these targets:

all

This is the default target that builds final artifact of the project: a book. Artifacts should be output to the directory out in project root. If out does not exist, it should be created.

clean

Removes all temporary and intermediate files, leaving just the original sources and the final artifact.

superclean

Depends on clean. This target cleans everything that clean does, plus the artifacts of the project.