-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
54 lines (39 loc) · 1.39 KB
/
Makefile
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
# Copyright 2008 Markus Dittrich <markusle@gmail.com>
# Distributed under the terms of the GNU General Public License v3
VERSION=0.5
DESTDIR=
mandir=$(DESTDIR)/usr/share/man/man1
docdir=$(DESTDIR)/usr/share/doc/husky-$(VERSION)
htmldir=$(docdir)/html
bindir=$(DESTDIR)/usr/bin
GHC_FLAGS_DEVEL = -O -Wall -fwarn-simple-patterns -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-monomorphism-restriction -fwarn-implicit-prelude -Werror -fno-warn-orphans
GHC_FLAGS_RELEASE = -O2
OBJECTS = src/husky.hs src/CalculatorParser.hs src/CalculatorState.hs \
src/ErrorParser.hs \
src/ExtraFunctions.hs src/HelpParser.hs src/InfoRoutines.hs \
src/Parser.hs src/PrettyPrint.hs src/TokenParser.hs \
src/UnitConverter.hs src/UnitConversionParser.hs
all: debug
husky: $(OBJECTS)
ghc -i./src $(GHC_FLAGS_RELEASE) --make src/husky.hs
debug: $(OBJECTS)
ghc -i./src $(GHC_FLAGS_DEVEL) --make src/husky.hs
check: $(OBJECTS)
ghc -i./src --make test/CalculatorTest.hs
ghc -i./src --make test/ConverterTest.hs
@./test/CalculatorTest
@echo
@echo
@echo
@./test/ConverterTest
install: husky
install -d $(docdir)
install -d $(bindir)
install -d $(htmldir)
install -m 0755 src/husky $(bindir)/
install -m 0644 ChangeLog COPYING AUTHORS $(docdir)/
install -m 0644 doc/usage.html $(htmldir)/
.PHONY: clean
clean:
rm -f src/*.o src/*.hi src/husky test/*.o test/*.hi \
test/CalculatorTest test/ConverterTest