Browse Source

Add support to user lib in Makefile

master
JT Acquaviva 3 years ago
parent
commit
fdf70a0e1d
  1. 13
      test/Makefile

13
test/Makefile

@ -7,11 +7,11 @@ INCLUDES=-I$(ROOT)/emulation/
RM = rm -rf
SRC=reduce-traditionnal.c data_gen.c
BIN=reduce-traditional data-gen reduce-ngi
OBJ=libngi.so
OBJ=libngi.so libreduce-ngi-userlib.so
all: clean build test
build: data-gen reduce-ngi reduce-traditional
build: $(BIN) $(OBJ)
clean:
$(RM) $(BIN) $(OBJ)
@ -25,11 +25,14 @@ data-gen: data-gen.c
# Build NGI Emulation lib
libngi.so: $(ROOT)/emulation/ngi.c
@echo 'Building ngi shared library: $@'
@echo $(ROOT)
$(CC) $(CLFAFS) $(INCLUDES) $< -shared -fpic -o $@
$(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 $@
reduce-ngi: reduce-ngi.c libngi.so
$(CC) $(CFLAGS) $< -o $@ $(INCLUDES) -L. -l ngi -Wl,-rpath=$(PWD)
$(CC) $(CFLAGS) $< -o $@ $(INCLUDES) -L. -l ngi -Wl,-rpath=$(PWD) -ldl
test:
@echo "Data generation"

Loading…
Cancel
Save