]> mj.ucw.cz Git - moe.git/blob - Makefile
Enabled -lm in both C and C++.
[moe.git] / Makefile
1 # Makefile for mo-eval and related utilities
2 # (c) 2007 Martin Mares <mj@ucw.cz>
3
4 VERSION=1.0.1
5 #DEBUG=-ggdb
6 CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -Winline $(DEBUG) -std=gnu99
7
8 # Comment out if you are using a recent gcc
9 CFLAGS+=-Wno-pointer-sign -Wdisabled-optimization -Wno-missing-field-initializers
10
11 # Comment out if you do not wish to build remote submit utilities
12 SUBMIT=submit
13 LIBUCW:=$(shell cd ../libucw && pwd)
14
15 export LIBUCW CFLAGS LDFLAGS DEBUG
16
17 all: bin/box bin/iwrapper bin/md5crypt bin/pedant $(SUBMIT)
18
19 bin/%: src/%.o
20         $(CC) $(LDFLAGS) -o $@ $^
21
22 bin/box: src/box.o
23 bin/iwrapper: src/iwrapper.o
24 bin/md5crypt: src/md5crypt.o src/md5.o
25 bin/pedant: src/pedant.o
26
27 submit:
28
29 clean::
30         rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core`
31         rm -f bin/box bin/iwrapper bin/md5crypt bin/pedant
32
33 distclean: clean
34
35 ifdef SUBMIT
36
37 submit:
38         $(MAKE) -C submit
39
40 clean::
41         $(MAKE) -C submit clean
42
43 endif
44
45 .PHONY: all clean distclean submit