File: Makefile

package info (click to toggle)
spamassassin 4.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 25,724 kB
  • sloc: perl: 89,143; ansic: 5,193; sh: 3,737; javascript: 339; sql: 295; makefile: 209; python: 49
file content (56 lines) | stat: -rw-r--r-- 1,570 bytes parent folder | download | duplicates (4)
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
CC=		gcc
CFLAGS=		-g -O2 -Wall 
LDFLAGS=	-lm

PGAPACK=	../build/pga
PGAPACKLIBDIR=  $(PGAPACK)/lib/linux    # linux
#PGAPACKLIBDIR=  $(PGAPACK)/lib/sun4     # solaris

# What rule scoreset are we using?
include config

# what rules directory are we reading rules from?
RULES=          ../rules

#### Should be no need to modify below this line

all: perceptron

perceptron: perceptron.o
	$(CC) -o perceptron perceptron.o $(LDFLAGS)

perceptron.o: tmp/rules_${SCORESET}.pl tmp/tests.h tmp/scores.h
	$(CC) $(CFLAGS) -c -o perceptron.o perceptron.c

garescorer: tmp/rules_${SCORESET}.pl tmp/tests.h tmp/scores.h garescorer.c
	(cd ../build/pga/source; make)
	$(CC) $(CFLAGS) -DWL=2 -DOPTIMIZE -L $(PGAPACKLIBDIR) \
          -I $(PGAPACK)/include garescorer.c -o garescorer -lpgaO $(LDFLAGS)

tmp/rules_${SCORESET}.pl: tmp/.created ../build/parse-rules-for-masses
	perl ../build/parse-rules-for-masses -d $(RULES) -s $(SCORESET) \
            -o tmp/rules_${SCORESET}.pl

tmp/tests.h: tmp/.created tmp/ranges.data logs-to-c
	perl logs-to-c --cffile=$(RULES) --scoreset=$(SCORESET)

tmp/scores.h: tmp/tests.h

tmp/ranges.data: tmp/.created freqs score-ranges-from-freqs
	perl score-ranges-from-freqs $(RULES) $(SCORESET) < freqs

freqs: spam.log ham.log
	perl hit-frequencies -c $(RULES) -x -p -s $(SCORESET) > freqs

badrules: freqs
	perl lint-rules-from-freqs < freqs > badrules

tmp/.created:
	-mkdir tmp
	touch tmp/.created

clean:
	rm -rf *.o perceptron tmp freqs badrules \
          perceptron.scores garescorer garescorer.scores \
          ../build/pga/lib/linux/*