2 CFLAGS += -I../ -I$(CINELERRA) -I$(GUICAST) -I../colors -fPIC
4 CFLAGS += $(static_incs)
5 LFLAGS += $(static_libs)
6 LDLINKER ?= g++ -shared
7 $(shell mkdir -p $(OBJDIR))
9 PLUGIN_DIR := $(BINDIR)/plugins
10 OUTPUT_DIR = $(PLUGIN_DIR)/$($(PLUGIN))
11 PLUGIN_PNGS = $(wildcard picon_*.png)
12 OUTPUT_PNGS = $(foreach png,$(PLUGIN_PNGS), $(PLUGIN_DIR)/$(basename $(png))/$(PLUGIN).png)
13 OUTPUT = $(OUTPUT_DIR)/$(PLUGIN).plugin
14 OUTPUT_G = $(OBJDIR)/$(PLUGIN).debuginfo
16 $(shell echo $(CFLAGS) > $(OBJDIR)/c_flags)
17 $(shell echo $(LFLAGS) > $(OBJDIR)/l_flags)
19 ifeq ($(OUTPUT_THEME),)
21 $(OUTPUT): $(OBJS) $(OUTPUT_DIR) $(OUTPUT_PNGS) $(OUTPUT_BINS)
22 $(LDLINKER) -o $(OUTPUT) $(OBJS) $(OUTPUT_BINS) `cat $(OBJDIR)/l_flags`
23 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT) $(OUTPUT_G))
24 $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT))
28 THEME_DATA = $(OBJDIR)/$(PLUGIN)_data.o
30 $(OUTPUT_THEME): $(OBJS) $(OUTPUT_DIR) $(THEME_DATA)
31 $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA)
32 $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT_THEME) $(OUTPUT_G))
33 $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT_THEME))
37 ../../../guicast/$(OBJDIR)/bootstrap $(notdir $(THEME_DATA)) ../data/*.png
44 $(PLUGIN_DIR)/%/$(PLUGIN).png: %.png
45 $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
56 $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.C) -o $*.o
59 @echo $($(subst val-,,$@))