holgersson-overlay/dev-libs/libmcp23s17/files/libmcp23s17-fix-build-system.patch
Nils Freydank 2b5add3906
dev-libs/libmcp23s17: Fix the Makefile patch.
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Manifest-Sign-Key: 766B8122134269123401492A8B54D7A3FF3CDB17
2018-05-01 11:58:48 +02:00

40 lines
902 B
Diff

--- 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)