1
0
mirror of https://github.com/bmartini/zynq-axis.git synced 2024-09-05 19:19:27 +08:00
zynq-axis/lib/Makefile
Berin Martini 01a04802cf Update CC variable in app & lib Makefiles
This change prepends the CROSS_COMPILE environmental variable to the compilers
definition. Thus adding the possibility of cross compiling when the cross
compiling tool chain has been setup correctly.
2015-02-12 01:52:10 -05:00

35 lines
548 B
Makefile

CC = ${CROSS_COMPILE}gcc
CFLAGS := -c -fpic -Wall -Werror
INCLUDES := -I.
LIBOPTS := -shared
.PHONY : all
all : interface
interface.o :
$(CC) $(CFLAGS) $(INCLUDES) interface.c
interface : interface.o
$(CC) *.o $(LIBOPTS) -o libinterface.so
install :
sudo cp ${PWD}/libinterface.so /usr/lib
sudo cp ${PWD}/interface.h /usr/include
sudo chmod 0755 /usr/lib/libinterface.so
sudo ldconfig
uninstall :
sudo rm /usr/lib/libinterface.so
sudo rm /usr/include/interface.h
sudo ldconfig
.PHONY : clean
clean :
rm -f *.o libinterface.so