holgersson-overlay/dev-libs/libmcp23s17/files/libmcp23s17-fix-build-system.patch

40 lines
902 B
Diff
Raw Normal View History

--- a/Makefile 2018-05-01 06:00:00.000000000 +0200
+++ b/Makefile 2018-05-01 06:00:00.000000001 +0200
@@ -1,11 +1,11 @@
PROJECT=mcp23s17
SOURCES=src/mcp23s17.c
-LIBRARY=static
+LIBRARY=shared
INCPATHS=
LIBPATHS=
-LDFLAGS=
-CFLAGS=-c -Wall
-CC=gcc
+LDFLAGS +=
+CFLAGS += -c -Wall
+CC ?= gcc
# ------------ MAGIC BEGINS HERE -------------
@@ -35,16 +35,16 @@
endif
.c.o:
- $(CC) $(INCFLAGS) $(CFLAGS) -fPIC $< -o $@
+ $(CC) $(INCFLAGS) $(CFLAGS) $(LIBFLAGS) -fPIC $< -o $@
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)