summaryrefslogblamecommitdiff
path: root/src/plugins/Makefile.in
blob: 00493a7c994f44b706a37ab989b50be95de99385 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                                                   


                                         
          





































                                                                          


                                     


                                                                             


                           


                                            
 

                                                
COMMON_OBJ = ../common/obj/showmsg.o ../common/obj/utils.o ../common/obj/strlib.o \
	../common/obj/minimalloc.o
COMMON_H = ../common/plugin.h ../common/cbasetypes.h \
	../common/showmsg.h ../common/utils.h ../common/strlib.h \
	../common/malloc.h

PLUGINS = sample sig pid gui upnp console

@SET_MAKE@

#####################################################################
.PHONY : all $(PLUGINS) clean help

all: $(PLUGINS)

sample: sample@DLLEXT@

sig: sig@DLLEXT@

pid: pid@DLLEXT@

gui: gui@DLLEXT@

upnp: upnp@DLLEXT@

console: console@DLLEXT@

clean:
	rm -rf *.o

help:
	@echo "possible targets are $(PLUGINS:%='%') 'all' 'clean' 'help'"
	@echo "'sample'   - sample plugin"
	@echo "'sig'      - signal handler plugin"
	@echo "'pid'      - process id plugin"
	@echo "'gui'      - gui plugin"
	@echo "'upnp'     - upnp plugin"
	@echo "'console'  - console plugin"
	@echo "'all'      - builds all above targets"
	@echo "'clean'    - cleans builds and objects"
	@echo "'help'     - outputs this message"

#####################################################################

%@DLLEXT@: %.c
	@CC@ @CFLAGS@ @CPPFLAGS@ -shared -o ../../plugins/$@ $<

gui@DLLEXT@: ../../plugins/gui.conf
upnp@DLLEXT@: ../../plugins/upnp.conf

sig@DLLEXT@: sig.c $(COMMON_OBJ)
	@CC@ @CFLAGS@ @CPPFLAGS@ -shared -o ../../plugins/$@ $< $(COMMON_OBJ)

../../plugins/%.conf: %.txt
	cp -r $< $@

# missing common object files
../common/obj/%.o: ../common/%.c $(COMMON_H)
	@$(MAKE) -C ../common txt

../common/obj/mini%.o: ../common/%.c $(COMMON_H)
	@$(MAKE) -C ../common txt