Add support to user lib in Makefile

This commit is contained in:
JT Acquaviva 2019-08-25 22:47:50 +02:00
parent 9d46cd6d83
commit fdf70a0e1d
1 changed files with 8 additions and 5 deletions

View File

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