Commit b1fba363 authored by Renaud Pacalet's avatar Renaud Pacalet
Browse files

Add compile options for profiling

parent c19aa7ab
......@@ -28,10 +28,10 @@
# Compilation #
###############
CC := cc
CFLAGS := -g -c -MMD -O --std=c99
LD := cc
LDFLAGS :=
CC := gcc
CFLAGS := -no-pie -pg -c -MMD -O3 --std=c99
LD := gcc
LDFLAGS := -no-pie -pg
LIBS := -lm
BUILDDIR := build
......@@ -93,7 +93,7 @@ $(foreach e,$(CEXECNAMES),$(eval $(call LINK_rule,$(e))))
$(BUILDDIR):
mkdir -p $@
clean::
clean:
rm -f $(COBJS) $(CDEPS) $(CEXECS)
###########
......@@ -101,7 +101,7 @@ clean::
###########
T := 100
V := 0
V := 1
SIGMA := 0.5
CHANNEL := awgn 0.5
......@@ -148,7 +148,7 @@ QCMATRICES :=
# $(1..4): STANDARD, Z, M, N
define TEST_rule
$(BUILDDIR)/$(1)_$(2)_$(3)_$(4).qc: $(MAKEQC)
$(BUILDDIR)/$(1)_$(2)_$(3)_$(4).qc: | $(MAKEQC)
$(AT)$(MAKEQC) --standard="$(1)" --lifting=$(2) --brows=$(3) --bcols=$(4) $$@
QCMATRICES += $(BUILDDIR)/$(1)_$(2)_$(3)_$(4).qc
......@@ -167,22 +167,22 @@ ENCS := $(patsubst %.qc,%.enc,$(QCMATRICES))
RECS := $(patsubst %.qc,%.rec,$(QCMATRICES))
DECS := $(patsubst %.qc,%.dec,$(QCMATRICES))
$(PCHKS): %.pchk: %.qc $(QCTOPCHK)
$(PCHKS): %.pchk: %.qc | $(QCTOPCHK)
$(AT)$(QCTOPCHK) $< $@
$(GENS): %.gen: %.pchk $(MAKEGEN)
$(GENS): %.gen: %.pchk | $(MAKEGEN)
$(AT)$(MAKEGEN) $< $@ $(GENMETHOD)
$(SRCS): %.src: $(RANDSRC)
$(SRCS): %.src: | $(RANDSRC)
$(AT)$(RANDSRC) $@ $(SEED) $(d)x$(T)
$(ENCS): %.enc: %.src %.pchk %.gen $(ENCODE)
$(ENCS): %.enc: %.src %.pchk %.gen | $(ENCODE)
$(AT)$(ENCODE) $*.pchk $*.gen $< $@ $(DEVNULL)
$(RECS): %.rec: %.enc $(TRANSMIT)
$(RECS): %.rec: %.enc | $(TRANSMIT)
$(AT)$(TRANSMIT) $< $@ $(SEED) $(CHANNEL) $(DEVNULL)
$(DECS): %.dec: %.rec %.pchk $(DECODE)
$(DECS): %.dec: %.rec %.pchk | $(DECODE)
$(AT)r=$$($(DECODE) $*.pchk $< $@ $(CHANNEL) $(DECMETHOD) 2>&1) && \
printf '%s:\t%s\n' '$*' "$$r"
......@@ -197,8 +197,6 @@ test-all: $(CEXECS) $(QCMATRICES)
test-clean:
rm -f $(addprefix $(BUILDDIR)/,*.qc *.pchk *.gen *.src *.dec *.enc *.rec)
clean:: test-clean
.PHONY: list
list: $(MAKEQC)
......@@ -225,5 +223,3 @@ $(DOCSCMS).pdf: $(DOCDIR)/$(DOCSCMS).tex $(DOCDIR)/biblio.bib
doc-clean:
rm -f $(DOCSCMS).aux $(DOCSCMS).log $(DOCSCMS).out $(DOCSCMS).bbl $(DOCSCMS).blg
clean:: doc-clean
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment