2018-05-01 11:58:48 +02:00
|
|
|
--- a/Makefile 2018-05-01 06:00:00.000000000 +0200
|
|
|
|
+++ b/Makefile 2018-05-01 06:00:00.000000001 +0200
|
2018-03-13 12:15:51 +01:00
|
|
|
@@ -1,11 +1,11 @@
|
|
|
|
PROJECT=mcp23s17
|
|
|
|
SOURCES=src/mcp23s17.c
|
|
|
|
-LIBRARY=static
|
2018-05-01 11:58:48 +02:00
|
|
|
+LIBRARY=shared
|
|
|
|
INCPATHS=
|
|
|
|
LIBPATHS=
|
2018-03-13 12:15:51 +01:00
|
|
|
-LDFLAGS=
|
|
|
|
-CFLAGS=-c -Wall
|
|
|
|
-CC=gcc
|
|
|
|
+LDFLAGS +=
|
2018-05-01 11:58:48 +02:00
|
|
|
+CFLAGS += -c -Wall
|
|
|
|
+CC ?= gcc
|
2018-03-13 12:15:51 +01:00
|
|
|
|
|
|
|
# ------------ MAGIC BEGINS HERE -------------
|
|
|
|
|
2018-05-01 11:58:48 +02:00
|
|
|
@@ -35,16 +35,16 @@
|
2018-03-13 12:15:51 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
.c.o:
|
|
|
|
- $(CC) $(INCFLAGS) $(CFLAGS) -fPIC $< -o $@
|
2018-05-01 11:58:48 +02:00
|
|
|
+ $(CC) $(INCFLAGS) $(CFLAGS) $(LIBFLAGS) -fPIC $< -o $@
|
2018-03-13 12:15:51 +01:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f $(BINARY)
|
|
|
|
|
|
|
|
example: example.c
|
|
|
|
- gcc -o example example.c -Isrc/ -L. -lmcp23s17
|
|
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o example example.c -Isrc/ -L. -lmcp23s17
|
|
|
|
|
|
|
|
interrupt_example: interrupt_example.c
|
|
|
|
- gcc -o interrupt_example interrupt_example.c -Isrc/ -L. -lmcp23s17
|
|
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o interrupt_example interrupt_example.c -Isrc/ -L. -lmcp23s17
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS)
|
2018-05-01 11:58:48 +02:00
|
|
|
|