Skip to content

Instantly share code, notes, and snippets.

View mbt's full-sized avatar

Michael B. Trausch mbt

View GitHub Profile
### Keybase proof
I hereby claim:
* I am mbt on github.
* I am mtrausch83 (https://keybase.io/mtrausch83) on keybase.
* I have a public key ASC0LU69lmK6mBwmPhRhQ9f3KgEYV0V42filR6zVCBiUdAo
To claim this, I am signing this object:
@mbt
mbt / GNUmakefile
Last active August 29, 2015 14:24
Min shared lib example
CC := gcc -std=gnu11
CFLAGS := -O0 -ggdb -Wall -Wextra
all: bin/libfoo.so main.bin
bin/libfoo.so: foo.o bar.o
mkdir -p bin
$(LINK.c) -shared $^ $(LOADLIBES) $(LDLIBS) -o $@
main.bin: LDLIBS += -L$(shell pwd)/bin -lfoo