xref: /relibc/pthreads-emb/Makefile (revision 40b2b829bc26583cc091fdca064004cfdebc10c5)
1SRC=$(wildcard *.c)
2OBJ=$(patsubst %.c,%.o,$(SRC))
3LOBJ=$(patsubst %.c,%.lo,$(SRC))
4
5all: libpthread.a
6
7libpthread.a: $(OBJ)
8	$(AR) -rcs $@ $(OBJ)
9
10libpthread.so: $(LOBJ)
11	$(CC) $(CFLAGS) -nostdlib -shared -o $@ $(LOBJ)
12
13%.o: %.c
14	$(CC) $(CFLAGS) -I . -c $< -o $@
15
16%.lo: %.c
17	$(CC) $(CFLAGS) -fPIC -I . -c $< -o $@
18