server-side-compute/test/Makefile

44 lines
970 B
Makefile
Raw Permalink Normal View History

2019-08-25 20:32:56 +00:00
ROOT=../../server-side-compute
CC=gcc
CFLAGS=-Wall -Wextra -g3
INCLUDES=-I$(ROOT)/emulation/
RM = rm -rf
SRC=reduce-traditionnal.c data_gen.c
BIN=reduce-traditional data-gen reduce-ngi
2019-08-25 20:47:50 +00:00
OBJ=libngi.so libreduce-ngi-userlib.so
2019-08-25 20:32:56 +00:00
all: clean build test
2019-08-25 20:47:50 +00:00
build: $(BIN) $(OBJ)
2019-08-25 20:32:56 +00:00
clean:
$(RM) $(BIN) $(OBJ)
reduce-traditional: reduce-traditional.c
$(CC) $(CFLAGS) $< -o $@ -g3
data-gen: data-gen.c
$(CC) $(CFLAGS) $< -o $@
# Build NGI Emulation lib
libngi.so: $(ROOT)/emulation/ngi.c
@echo 'Building ngi shared library: $@'
2019-08-25 20:47:50 +00:00
$(CC) $(CLFAGS) $(INCLUDES) $< -shared -fpic -o $@
libreduce-ngi-userlib.so: reduce-ngi-userlib.c
@echo 'Building ngi user shared library: $@'
gcc $(CFLAGS) -Wall -Wextra $< -shared -fpic -o $@
2019-08-25 20:32:56 +00:00
reduce-ngi: reduce-ngi.c libngi.so
2019-08-25 20:47:50 +00:00
$(CC) $(CFLAGS) $< -o $@ $(INCLUDES) -L. -l ngi -Wl,-rpath=$(PWD) -ldl
2019-08-25 20:32:56 +00:00
test:
@echo "Data generation"
@./data-gen
@echo "Executing traditional"
@./reduce-traditional
@echo "Executing NGI"
@./reduce-ngi