42 lines
667 B
Makefile
42 lines
667 B
Makefile
##
|
|
# Nodesystem
|
|
#
|
|
# @file
|
|
# @version 0.1
|
|
|
|
CC="tcc"
|
|
DIR=build
|
|
SRC=src
|
|
OUT=libnodesystem.so
|
|
|
|
OBJ_FLAGS=-c -Wall -Werror -I include/
|
|
|
|
all: $(DIR)/node.o $(DIR)/node2d.o
|
|
$(CC) -shared -o $(OUT) $^
|
|
|
|
build/node.o: $(SRC)/node.c $(DIR)
|
|
$(CC) $(OBJ_FLAGS) $(SRC)/node.c -o $@
|
|
build/node2d.o: $(SRC)/node2d.c $(DIR)
|
|
$(CC) $(OBJ_FLAGS) $(SRC)/node2d.c -o $@
|
|
|
|
install:
|
|
make remove
|
|
cp $(OUT) /usr/lib/
|
|
chmod 0755 /usr/lib/$(OUT)
|
|
ldconfig
|
|
[ -d /usr/include/NODESYS ] || mkdir /usr/include/NODESYS
|
|
cp -r include/* /usr/include/NODESYS
|
|
|
|
remove:
|
|
rm -f /usr/lib/$(OUT)
|
|
rm -rf /usr/include/NODESYS
|
|
|
|
$(DIR):
|
|
mkdir $(DIR)
|
|
|
|
clean:
|
|
rm -rf build
|
|
rm -f libnodesystem.so
|
|
|
|
# end
|