• Sam Hocevar's avatar
    · 6b3c8540
    Sam Hocevar authored
      * Beginning of the built-in modules support.
    
       A few words about the changes:
    
      - heavy Makefile butchery has taken place, each plugin now has its own
        Makefile. I know recursive make blablah harmful, but it was just so
        much easier to do this way.
    
      - Makefile.in has disappeared, we now generate Makefile.opts with
        the overall configuration options, and Makefile.modules which is
        specific to module compilation.
    
      - After ./configure has been run you may want to modify Makefile.opts
        to check which modules will be compiled built-in or as plugins.
    
      - Some modules cannot be compiled built-in right now because proper
        linkage doesn't work yet. We don't really care since they're the
        interface or video output modules. The most important stuff works
        (iDCT, motion, YUV, input).
    
      - It's perfectly valid to compile a module both as built-in and as a
        plugin. vlc will only load the built-in one, but I'll add an option
        to ignore built-in modules for testing purposes.
    
      - We *should* see a performance increase here. I didn't have much time
        to test it, but if anyone can confirm and perhaps give a rough
        estimate of how much we gain...
    6b3c8540
Makefile 1.35 KB
###############################################################################
# vlc (VideoLAN Client) gtk module Makefile
# (c)2001 VideoLAN
###############################################################################

include ../../Makefile.modules

###############################################################################
# Objects and files
###############################################################################
PLUGIN_GTK = gtk.o intf_gtk.o gtk_callbacks.o gtk_interface.o gtk_support.o gtk_playlist.o
BUILTIN_GTK = $(PLUGIN_GTK:%.o=%-BUILTIN.o)

ALL_OBJ = $(PLUGIN_GTK) $(BUILTIN_GTK)

objects := $(PLUGIN_GTK) $(BUILTIN_GTK)
cdependancies := $(objects:%.o=.dep/%.d)

export

#
# Virtual targets
#
all:

clean:
	rm -f $(ALL_OBJ)
	rm -f *.o *.moc *.bak *.so *.a *.builtin
	rm -rf .dep

FORCE:

$(cdependancies): %.d: FORCE
	@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@

$(ALL_OBJ): %.o: ../../Makefile.dep

$(PLUGIN_GTK): %.o: .dep/%.d
$(PLUGIN_GTK): %.o: %.c
	$(CC) $(CFLAGS) $(PCFLAGS) `gtk-config --cflags gtk` -c -o $@ $<

$(BUILTIN_GTK): %-BUILTIN.o: .dep/%.d
$(BUILTIN_GTK): %-BUILTIN.o: %.c
	$(CC) $(CFLAGS) -DBUILTIN `gtk-config --cflags gtk` -c -o $@ $<

#
# Real targets
#
../../lib/gtk.so: $(PLUGIN_GTK)
	$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) `gtk-config --libs gtk | sed 's,-rdynamic,,'`

../../lib/gtk.a: $(BUILTIN_GTK)
	ar r $@ $^