# Part 0
# load common stuff
TOPDIR = ..
include $(TOPDIR)/Makefile.common


INCS += -I../
SRC = image.c menu.c separator.c taskbar.c wincmd.c \
	dclock.c launchbar.c pager.c space.c test.c \
	icons.c deskno.c

ifeq ($(PLUGIN_CPU),on)
SRC += cpu.c
endif

SOBJ = $(SRC:%.c=%.so)
SCFLAGS := $(CFLAGS) -shared -fPIC



ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),tar)
-include $(DEP)
endif
endif
endif



all:$(SOBJ)

%.so: %.o
	$(call summary,LD  ,$@)
	$(Q)$(CC) $(SCFLAGS) $(INCS) $< -o $@
ifeq (0,$(DEVEL))
	$(Q)strip $@
endif


install: 
	install -d  $(PREFIX)/share/fbpanel/plugins
	install -m 644 $(SOBJ) $(PREFIX)/share/fbpanel/plugins

uninstall:
	$(RM) -r $(PREFIX)/share/fbpanel/plugins/

