mirror of
https://github.com/lxsang/antd-wvnc-plugin.git
synced 2024-12-27 04:18:22 +01:00
46 lines
828 B
Makefile
46 lines
828 B
Makefile
include ../../var.mk
|
|
PL_NAME=wvnc
|
|
PLUGINS=$(PL_NAME).$(EXT)
|
|
APP_DIR=$(BUILDIRD)/htdocs/
|
|
|
|
OBJS = $(PLUGINS_BASE)/plugin.o
|
|
|
|
PLUGINSDEP = $(OBJS) \
|
|
wvnc.o
|
|
|
|
PLUGINLIBS = libantd.$(EXT) -lvncclient -lpthread -lz# -lsqlite3
|
|
|
|
PCFLAGS=-W -Wall -g -D DEBUG $(PPF_FLAG) -D USE_ZLIB
|
|
|
|
main: $(PLUGINSDEP) $(PLUGINS) #lib
|
|
|
|
%.o: %.c
|
|
$(CC) $(PCFLAGS) -fPIC $(INCFLAG) -c $< -o $@
|
|
|
|
%.$(EXT):
|
|
-ln -s $(PBUILDIRD)/libantd.$(EXT) .
|
|
$(CC) $(PCFLAGS) $(PLUGINSDEP) $(PLUGINLIBS) -shared -o $(PBUILDIRD)/$(basename $@).$(EXT)
|
|
|
|
|
|
clean: #libclean
|
|
-rm -f *.o *.$(EXT) $(PBUILDIRD)/$(PLUGINS)
|
|
-rm $(PLUGINS_BASE)/plugin.o
|
|
|
|
libclean:
|
|
for file in lib/* ;do \
|
|
if [ -d "$$file" ]; then \
|
|
echo "Cleaning $$file" ;\
|
|
make -C "$$file" clean; \
|
|
fi \
|
|
done
|
|
|
|
|
|
|
|
|
|
.PRECIOUS: %.o
|
|
.PHONY: lib clean
|
|
full: clean main
|
|
|
|
|
|
|