forked from barak/LDPC-codes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (37 loc) · 1.66 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
# MAKEFILE FOR LDPC PROGRAMS & ASSOCIATED UTILITIES.
# Copyright (c) 1995-2012 by Radford M. Neal.
#
# Permission is granted for anyone to copy, use, modify, and distribute
# these programs and accompanying documents for any purpose, provided
# this copyright notice is retained and prominently displayed, and note
# is made of any changes made to these programs. These programs and
# documents are distributed without any warranty, express or implied.
# As the programs were written for research purposes only, they have not
# been tested to the degree that would be advisable in any important
# application. All use of these programs is entirely at the user's own
# risk.
# NOTE: The natural random numbers in "randfile" are accessed by the
# 'rand' module via a path to this directory. Change the definition of
# RAND_FILE in the compilation command for rand.c below if this is not
# appropriate.
all: progs tests
progs = make-pchk alist-to-pchk pchk-to-alist make-ldpc print-pchk \
make-gen print-gen rand-src encode transmit decode extract verify \
extract_systematic
progs: $(progs)
tests = mod2dense-test mod2sparse-test mod2convert-test rand-test
tests: $(tests)
CFLAGS += -Wall -Wno-maybe-uninitialized
CFLAGS += -O2
CFLAGS += -g
LOADLIBES += -lm
ofiles = alloc.o blockio.o channel.o check.o dec.o distrib.o enc.o \
intio.o mod2convert.o mod2dense.o mod2sparse.o open.o rand.o rcode.o
RAND_FILE = $$(pwd)/randfile
rand.o: CPPFLAGS+=-DRAND_FILE=\"$(RAND_FILE)\"
$(progs) $(tests): $(ofiles)
# CLEAN UP ALL PROGRAMS AND REMOVE ALL FILES PRODUCED BY TESTS AND EXAMPLES.
clean:
rm -f core *.o *.exe ex-*.* test-file \
$(progs) $(tests)
.PHONY: all progs tests clean