]> git.sesse.net Git - mlt/blobdiff - src/melt/Makefile
A little debugging.
[mlt] / src / melt / Makefile
index 6d501d96793a2dc8bc5f7cd149ebfbf1054148f4..b2ea3ed97d14a9002acd402a2af64b6ed842a528 100644 (file)
@@ -1,5 +1,4 @@
 include ../../config.mak
-include config.mak
 
 OBJS = melt.o \
           io.o
@@ -11,14 +10,16 @@ LDFLAGS += -L../framework -lmlt -lpthread
 SRCS := $(OBJS:.o=.c)
 
 ifeq ($(targetos), MinGW)
-CFLAGS += `sdl-config --cflags`
-LDFLAGS += `sdl-config --libs`
+ifeq (, $(findstring MELT_NOSDL, $(CFLAGS)))
+CFLAGS += $(shell sdl-config --cflags)
+LDFLAGS += $(shell sdl-config --libs)
+endif
 bindir = $(prefix)
 endif
 
-all: $(TARGET)
+all: $(meltname)
 
-$(TARGET): $(OBJS)
+$(meltname): $(OBJS)
                $(CC) -o $@ $(OBJS) $(LDFLAGS)
 
 depend:        $(SRCS)
@@ -28,14 +29,24 @@ distclean:  clean
                rm -f .depend
 
 clean: 
-               rm -f $(OBJS) $(TARGET)
+               rm -f $(OBJS) $(meltname)
 
 install:       all
        install -d "$(DESTDIR)$(bindir)"
-       install -c -m 755 $(TARGET) "$(DESTDIR)$(bindir)"
+       install -c -m 755 $(meltname) "$(DESTDIR)$(bindir)"
+ifeq ($(extra_versioning), true)
+ifeq ($(melt_noversion), false)
+       ln -s $(meltname) "$(DESTDIR)$(bindir)/melt"
+endif
+endif
 
 uninstall:
-       rm -f "$(DESTDIR)$(bindir)/$(TARGET)"
+       rm -f "$(DESTDIR)$(bindir)/$(meltname)"
+ifeq ($(extra_versioning), true)
+ifeq ($(melt_noversion), false)
+       rm -f "$(DESTDIR)$(bindir)/melt"
+endif
+endif
 
 ifneq ($(wildcard .depend),)
 include .depend