23 lines
334 B
Makefile
23 lines
334 B
Makefile
PLUGINS := $(wildcard *.c)
|
|
CFLAGS := -O2 -pipe -Wall -I../include
|
|
|
|
all: $(PLUGINS:.c=.so)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
%.so: %_sh.o
|
|
$(LD) -shared -o $@ $<
|
|
|
|
%_sh.o: %.c
|
|
$(CC) $(CFLAGS) -fPIC -c $< -o $@
|
|
|
|
%.d: %.c
|
|
$(CC) $(CFLAGS) -MM -c $< -o $@
|
|
|
|
clean:
|
|
rm -f *.so *.d *.o
|
|
|
|
DEPS := $(wildcard *.c)
|
|
-include $(DEPS:.c=.d)
|