aboutsummaryrefslogtreecommitdiff
path: root/pymake.conf
blob: a941a7c829ac3f498022f3f6a05e9390f47fd66e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
### pymake by ~3o~ph()g (neonphog.com) ###
## This skeleton file was generated by pymake... please edit for your project.

## Global flag section, uncomment to set flags which will be applied to all
CXXFLAGS: -ggdb -Ilibbu++/src
LDFLAGS: -Llibbu++ -lbu++ 

[BUILD]
FILE: src/build.y
COMMAND: stupid
OUTPUT: parser

[BUILD]
FILE: src/build.l
COMMAND: stupid
OUTPUT: lexer

## A simple command to build everything in this directory, and output
## an executable with the name 'main'
[BUILD]
DIR: src
COMMAND: exe
OUTPUT: build

## To run a command, like a legacy 'make' command, issue the following:
#[RUN]
#COMMAND: make -C testsrc/legacy		#this command will normally be run
#CLEAN: make -C testsrc/legacy clean	#this command will be run on '-c'

## A more complicated build example
#[BUILD]
#COMMAND: exe
#OUTPUT: the_one
#DIR: testsrc/one
#FILE: testsrc/share/test.cpp
#CXXFLAGS: -Itestsrc/share
#LDFLAGS: -lreadline

## The [DIRBUILD] macro expands into many [BUILD] sections:
#[DIRBUILD]
#COMMAND: exe
#OUTPUT: db{NAME}.so		#{NAME} will be replaced with the directory name
#ROOT: testsrc/db
#CXXFLAGS -Itestsrc/share
#LDFLAGS: -lreadline

## The [OVERRIDE] directive allows you to append flags to specific targets
#[OVERRIDE]
#FILE: testsrc/db/mysql/main.o
#CXXFLAGS: -I../..

### The following are the build commands and triggers ###
### These are the default gnu g++ build commands ###

### Compile trigger ###
## Takes c++ source code, builds an object file
## Includes function for dependancy checking
[TRIGGER]
INPUT: .cpp    #take input of *.cpp files
OUTPUT: .o     #output .o files
COMMAND: g++ -c {INPUT} {CXXFLAGS} -I{DIR} -o {OUTPUT}
CHECK: g++ -M {INPUT} {CXXFLAGS} -I{DIR}

[TRIGGER]
INPUT: .c    #take input of *.cpp files
OUTPUT: .o     #output .o files
COMMAND: g++ -c {INPUT} {CXXFLAGS} -I{DIR} -o {OUTPUT}
CHECK: g++ -M {INPUT} {CXXFLAGS} -I{DIR}

[TRIGGER]
INPUT: .y
OUTPUT: .tab.c
COMMAND: bison {INPUT}

[TRIGGER]
INPUT: .l
OUTPUT: .yy.c
COMMAND: flex --bison-bridge --bison-locations -o {OUTPUT} {INPUT}

### Executable command ###
## Use this command if you want a simple executable
[COMMAND]
NAME: exe
COMMAND: g++ {INPUT} {LDFLAGS} -o {OUTPUT}

### Library command ###
## Use this command if you wish to create a library
[COMMAND]
NAME: lib
COMMAND: ar cr{ARFLAGS} {OUTPUT} {INPUT}

[COMMAND]
NAME: stupid

### Strange example ###
## The following trigger will take all *.q files, strip all '&'s from them
## and generate a .cpp file, which will then be compiled using the cpp trigger.
#[TRIGGER]
#INPUT: .q
#OUTPUT: .cpp
#COMMAND: sed -e "s/&//g" {INPUT} > {OUTPUT}