working version: displays only bests results so far.

This commit is contained in:
2021-01-23 14:33:55 +01:00
parent 9f14b5e076
commit 0931d679fa
7 changed files with 246 additions and 111 deletions

View File

@@ -1,6 +1,7 @@
SHELL := /bin/bash
#CFLAGS := -w -O3
CFLAGS := -w -g -pg -DDEBUG
CFLAGS := -w -O3 -pg
#CFLAGS := -w -g -pg -DDEBUG
#CFLAGS := -w -g -pg -DDEBUG
TIME := \time -f "\ttime: %E real, %U user, %S sys\n\tcontext-switch:\t%c+%w, page-faults: %F+%R\n"
export PATH := .:$(PATH)
@@ -13,13 +14,15 @@ OBJS=$(TARGETS:=.o)
all: $(TARGETS)
lceb: $(OBJS)
$(CC) $(CFLAGS) -DSTANDALONE -o $@ $^
tree: tree.c lceb.h
tree: tree.c
$(CC) $(CFLAGS) -DSTANDALONE -o $@ $?
oper: oper.c lceb.h
oper: oper.c
$(CC) $(CFLAGS) -DSTANDALONE -o $@ $?
eval.o stack.o best.o: lceb.h
lceb.o tree.o oper.o eval.o stack.o best.o: lceb.h
tree oper: lceb.h
ex2: ex2-c
@$(TIME) ex2-c < $(INPUT)