Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INCLUDES = \
-I$(DIR)/libraries \
-I$(DIR)/libraries/SPI \
-I$(DIR)/libraries/Wire \
-I$(DIR)/libraries/PN532_SPI
-I$(DIR)/libraries/PN532_SPI

CFLAGS = -fPIC
#CFLAGS = $(INCLUDES)
Expand Down Expand Up @@ -49,20 +49,18 @@ SRCS = \
OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(SRCS)))

%.o: %.cpp
@rm -f $@
@rm -f $@
$(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@ -Wno-deprecated-declarations

%.o: %.c
@rm -f $@
@rm -f $@
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ -Wno-deprecated-declarations

LIB_STATIC = libarduino.a
LIB_SHARE = libarduino.so
LIB = $(LIB_STATIC) $(LIB_SHARE)

all: $(LIB)
make -C sample/


$(LIB): $(OBJS)
$(AR) cq $(LIB_STATIC) $(OBJS)
Expand All @@ -71,4 +69,13 @@ $(LIB): $(OBJS)
clean:
rm -f $(LIB_STATIC) $(LIB_SHARE) $(OBJS)

install:
cp -rf $(DIR)/$(LIB_STATIC) /usr/local/lib/
cp -rf $(DIR)/$(LIB_SHARE) /usr/local/lib/
cp -rf $(DIR)/hardware /usr/local/include/
cp -rf $(DIR)/libraries /usr/local/include/
cp -rf $(DIR)/sample/core.h /usr/local/include/

samples:
make -C sample/

5 changes: 5 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Installation instructions:

Run "$ make" first then if you want to build the examples run
"$ make samples". Finally run "$ sudo make install" to copy headers and libraries to your pcduino