Add support to user lib in Makefile
This commit is contained in:
parent
9d46cd6d83
commit
fdf70a0e1d
test
|
@ -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…
Reference in New Issue