# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/fake/libmpeg3/makefile.patch
|
|
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
--- ./Makefile.orig 2003-08-10 00:21:59.000000000 +0200
|
|
+++ ./Makefile 2003-08-16 22:49:20.000000000 +0200
|
|
@@ -1,8 +1,9 @@
|
|
CC = gcc
|
|
NASM = nasm
|
|
USE_MMX = 0
|
|
-USE_CSS = 1
|
|
+USE_CSS = 0
|
|
A52DIR := $(shell expr a52dec* )
|
|
+PREFIX = /usr
|
|
|
|
HAVE_NASM := $(shell if [ -x /usr/bin/nasm -o -x /usr/local/bin/nasm ]; then echo y; else echo n; fi)
|
|
|
|
@@ -10,45 +11,36 @@
|
|
$(error "Nasm is required. Download it from nasm.sourceforge.net.")
|
|
endif
|
|
|
|
+#ifeq ($(origin CFLAGS), environment)
|
|
+#HAVE_CFLAGS := yes
|
|
+#else
|
|
+#HAVE_CFLAGS := no
|
|
+#endif
|
|
|
|
-ifeq ($(origin CFLAGS), environment)
|
|
-HAVE_CFLAGS := yes
|
|
-else
|
|
-HAVE_CFLAGS := no
|
|
-endif
|
|
-
|
|
-
|
|
-OBJDIR := $(shell uname --machine)
|
|
-
|
|
-
|
|
+OBJDIR := obj
|
|
|
|
-
|
|
-ifeq ($(OBJDIR), alpha)
|
|
+ifeq ($(ARCH), alpha)
|
|
USE_MMX = 0
|
|
ifneq ($(HAVE_CFLAGS), yes)
|
|
- CFLAGS := -O4 -arch ev67 -ieee -accept c99_keywords -gcc_messages
|
|
+ CFLAGS += -O4 -ieee
|
|
endif
|
|
endif
|
|
|
|
-ifeq ($(OBJDIR), i686)
|
|
- USE_MMX = 1
|
|
+ifeq ($(ARCH), x86)
|
|
+ USE_MMX = 0
|
|
ifneq ($(HAVE_CFLAGS), yes)
|
|
CFLAGS := -O2 -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=2 -I/usr/local/include
|
|
endif
|
|
CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
|
|
endif
|
|
|
|
-ifeq ($(OBJDIR), x86_64)
|
|
+ifeq ($(ARCH), x86_64)
|
|
ifneq ($(HAVE_CFLAGS), yes)
|
|
CFLAGS := -O2 -fomit-frame-pointer -I/usr/local/include
|
|
endif
|
|
CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
|
|
-
|
|
-
|
|
endif
|
|
|
|
-
|
|
-
|
|
ifeq ($(USE_CSS), 1)
|
|
CFLAGS += -DHAVE_CSS
|
|
endif
|
|
@@ -59,27 +51,11 @@
|
|
NASMOBJS = $(OBJDIR)/video/reconmmx.o
|
|
endif
|
|
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
CFLAGS += \
|
|
-I. \
|
|
-I$(A52DIR)/include \
|
|
-I$(A52DIR)/liba52
|
|
|
|
-#CFLAGS += -g
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
-
|
|
OBJS = \
|
|
$(OBJDIR)/audio/ac3.o \
|
|
$(OBJDIR)/audio/dct.o \
|
|
@@ -113,21 +89,6 @@
|
|
$(OBJDIR)/video/vlc.o \
|
|
$(OBJDIR)/workarounds.o
|
|
|
|
-#OBJS = \
|
|
-# $(OBJDIR)/audio/ac3.o \
|
|
-# $(OBJDIR)/audio/bit_allocation.o \
|
|
-# $(OBJDIR)/audio/exponents.o \
|
|
-# $(OBJDIR)/audio/header.o \
|
|
-# $(OBJDIR)/audio/huffman.o \
|
|
-# $(OBJDIR)/audio/layer2.o \
|
|
-# $(OBJDIR)/audio/layer3.o \
|
|
-# $(OBJDIR)/audio/mantissa.o \
|
|
-# $(OBJDIR)/audio/pcm.o \
|
|
-# $(OBJDIR)/audio/tables.o \
|
|
-
|
|
-
|
|
-
|
|
-
|
|
DIRS := \
|
|
$(OBJDIR)/audio \
|
|
$(OBJDIR)/video
|
|
@@ -136,12 +97,10 @@
|
|
|
|
DIRS += $(A52DIRS)
|
|
|
|
-
|
|
OUTPUT = $(OBJDIR)/libmpeg3.a
|
|
-UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3cat
|
|
-
|
|
-#$(OBJDIR)/mpeg3split
|
|
-
|
|
+SHARED = $(OBJDIR)/libmpeg3.so
|
|
+UTILS = $(OBJDIR)/mpeg3dump $(OBJDIR)/mpeg3toc $(OBJDIR)/mpeg3cat
|
|
+ #$(OBJDIR)/mpeg3split
|
|
|
|
LIBS = -lm -lpthread
|
|
|
|
@@ -152,13 +111,13 @@
|
|
$(shell echo $(OBJS) $(ASMOBJS) $(A52OBJS) $(NASMOBJS) > $(OBJDIR)/objs)
|
|
$(shell mkdir -p $(DIRS) )
|
|
|
|
-all: $(OUTPUT) $(UTILS)
|
|
-
|
|
+all: $(OUTPUT) $(SHARED) $(UTILS)
|
|
|
|
$(OUTPUT): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
|
|
ar rcs $(OUTPUT) `cat $(OBJDIR)/objs`
|
|
|
|
-
|
|
+$(SHARED): $(OBJS) $(ASMOBJS) $(NASMOBJS) $(A52OBJS)
|
|
+ $(CC) `cat $(OBJDIR)/c_flags` -shared -o $(SHARED) $(OBJS) $(ASMOBJS) $(NASMOBJS) `ls $(OBJDIR)/a52dec*/liba52/*.o` -Wl,-soname -Wl,libmpeg3.so
|
|
|
|
$(OBJDIR)/mpeg3dump: $(OUTPUT) mpeg3dump.c
|
|
$(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3dump mpeg3dump.c $(OUTPUT) $(LIBS)
|
|
@@ -169,8 +128,8 @@
|
|
$(OBJDIR)/mpeg3cat: $(OUTPUT) mpeg3cat.c
|
|
$(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3cat mpeg3cat.c $(OUTPUT) $(LIBS)
|
|
|
|
-#$(OBJDIR)/mpeg3split: $(OUTPUT)
|
|
-# $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
|
|
+$(OBJDIR)/mpeg3split: $(OUTPUT)
|
|
+ $(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg3split mpeg3split.c $(OUTPUT) $(LIBS)
|
|
|
|
$(OBJDIR)/mpeg2qt: $(OUTPUT)
|
|
$(CC) `cat $(OBJDIR)/c_flags` -o $(OBJDIR)/mpeg2qt mpeg2qt.c \
|
|
@@ -184,7 +143,14 @@
|
|
-ldl
|
|
|
|
install:
|
|
- cp $(UTILS) /usr/bin
|
|
+ install -d $(PREFIX)/bin $(PREFIX)/lib $(PREFIX)/include/audio $(PREFIX)/include/video
|
|
+ install -m 755 $(UTILS) $(PREFIX)/bin
|
|
+ install $(OUTPUT) $(PREFIX)/lib
|
|
+ install $(SHARED) $(PREFIX)/lib
|
|
+ install -m 644 *.h $(PREFIX)/include
|
|
+ install -m 644 *.inc $(PREFIX)/include
|
|
+ install -m 644 audio/*.h $(PREFIX)/include/audio
|
|
+ install -m 644 video/*.h $(PREFIX)/include/video
|
|
|
|
clean:
|
|
rm -rf $(OBJDIR)
|
|
@@ -245,6 +211,4 @@
|
|
$(OBJDIR)/video/vlc.o: video/vlc.c
|
|
$(OBJDIR)/workarounds.o: workarounds.c
|
|
|
|
-
|
|
-
|
|
include depend.a52
|