mirror of
https://github.com/lxsang/antd-cgi-plugin
synced 2024-12-26 18:08:21 +01:00
38 lines
683 B
Makefile
38 lines
683 B
Makefile
include ../../var.mk
|
|
PL_NAME=cgi
|
|
PLUGINS=$(PL_NAME).$(EXT)
|
|
APP_DIR=$(BUILDIRD)/htdocs/
|
|
|
|
OBJS = $(PLUGINS_BASE)/plugin.o
|
|
|
|
PLUGINSDEP = $(OBJS) \
|
|
cgi.o
|
|
|
|
|
|
PLUGINLIBS = libantd.$(EXT) -lvncclient -lpthread -lz -ljpeg# -lsqlite3
|
|
|
|
PCFLAGS=-W -Wall -g -D DEBUG $(PPF_FLAG)
|
|
|
|
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
|
|
|
|
|
|
|
|
.PRECIOUS: %.o
|
|
.PHONY: lib clean
|
|
full: clean main
|
|
|
|
|
|
|