Makefile 447 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
LIBRARIES=libmoberg_libtest.so
CCFLAGS+=-Wall -Werror -I../.. -I. -O3 -g -fPIC
LDFLAGS+=-Lbuild/ -lmoberg
LDFLAGS_libtest=-shared -fPIC -L../../build -lmoberg  

all:	$(LIBRARIES:%=build/%)

build/libmoberg_%.so: build/%.o Makefile | build
	$(CC) $(LDFLAGS) $(LDFLAGS_$(*)) -o $@ $(filter %.o,$^)

.PRECIOUS: build/%.o
build/%.o:      %.c Makefile | build
	$(CC) $(CCFLAGS) -c -o $@ $<

build:
	mkdir -p $@

build/libtest.o: ../../moberg_module.h