mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 20:01:53 +00:00
47 lines
984 B
Makefile
47 lines
984 B
Makefile
# User settings
|
|
CC = gcc
|
|
AR = ar
|
|
RANLIB = ranlib
|
|
INSTALL = install
|
|
CFLAGS = -Wall -Wshadow -g
|
|
INCLUDES = -I.
|
|
|
|
# Used for 'make install'. Change/overwrite as needed.
|
|
prefix = /usr/local
|
|
libdir = $(prefix)/lib
|
|
includedir = $(prefix)/include
|
|
|
|
# Don't change these settings
|
|
SOURCES = rmff.c mb_file_io.c
|
|
HEADERS = librmff.h mb_file_io.h
|
|
OBJECTS := $(patsubst %.c,%.o,$(SOURCES))
|
|
|
|
CFLAGS += -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
|
|
|
|
all: librmff.a
|
|
|
|
clean:
|
|
rm -f $(OBJECTS) librmff.a
|
|
|
|
%.o: %.c librmff.h
|
|
$(CC) -c -o $@ $(CFLAGS) $(INCLUDES) $<
|
|
|
|
librmff.a: $(OBJECTS)
|
|
$(AR) rcvu $@ $?
|
|
$(RANLIB) $@
|
|
|
|
install: all
|
|
@if ! test -d $(includedir); then \
|
|
echo $(INSTALL) -d $(includedir); \
|
|
$(INSTALL) -d $(includedir); \
|
|
fi
|
|
@for i in $(HEADERS); do \
|
|
echo $(INSTALL) $$i $(includedir); \
|
|
$(INSTALL) $$i $(includedir); \
|
|
done
|
|
@if ! test -d $(libdir); then \
|
|
echo $(INSTALL) -d $(libdir); \
|
|
$(INSTALL) -d $(libdir); \
|
|
fi
|
|
$(INSTALL) librmff.a $(libdir)
|