X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmelt%2FMakefile;h=b2ea3ed97d14a9002acd402a2af64b6ed842a528;hb=HEAD;hp=c206a8128c9ea09fb83f4e96463dfd96babea414;hpb=5b0fa837f5e748c62823f7711d5fc1a4d7bc2950;p=mlt diff --git a/src/melt/Makefile b/src/melt/Makefile index c206a812..b2ea3ed9 100644 --- a/src/melt/Makefile +++ b/src/melt/Makefile @@ -1,8 +1,6 @@ include ../../config.mak -TARGET = inigo - -OBJS = inigo.o \ +OBJS = melt.o \ io.o CFLAGS += -I.. $(RDYNAMIC) -DVERSION=\"$(version)\" @@ -11,9 +9,17 @@ LDFLAGS += -L../framework -lmlt -lpthread SRCS := $(OBJS:.o=.c) -all: $(TARGET) +ifeq ($(targetos), MinGW) +ifeq (, $(findstring MELT_NOSDL, $(CFLAGS))) +CFLAGS += $(shell sdl-config --cflags) +LDFLAGS += $(shell sdl-config --libs) +endif +bindir = $(prefix) +endif + +all: $(meltname) -$(TARGET): $(OBJS) +$(meltname): $(OBJS) $(CC) -o $@ $(OBJS) $(LDFLAGS) depend: $(SRCS) @@ -23,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 -s -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