"Need help changing a makefile to static linking"

Post #303031202 by ACorner on Saturday 23rd of February 2019 12:47:35 PM

Trivia Category: Science: Computers
Difficulty: Medium
The common software-programming acronym "I18N" comes from the term "Interlocalization".
True or False?
Need help changing a makefile to static linking

Hi all,

I'm having a hard time compiling a plugin (softhddevice) for the video disk recorder software (vdr). Unfortunately the last official version of the plugin was published back in 2013 and even worse it has to be compiled against ffmpeg. The last working version of ffmpeg was 2.8.x, patches should make it work with 3.5.x (if you can find them). It's definitely not working with ffmpeg 4.x
So my thought was to forget about all the trouble with different versions and compile the plugin against a static built and working version of ffmpeg.
That was the quickly found plan, but the implementation is more than difficult if you are not used to deal with makefiles.
I tried to copy parts of the makefile(s) of tvheadend (which btw does exactly what I have in mind) that simply adds the .a files to the linking command. But without success. I know that there's the possibility to tell pck-config to use static libraries, but I have no glue where exactly in the makefile I have to insert this command and how I can force pkg-config to search within the ffmpeg directory.
I hope someone can push me in the right direction.
Thanks in advance

9 More Discussions You Might Find Interesting

1. Programming

Linking problem while linking to shared library

Hi I'm getting ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors When I run ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o after running gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c I'm... (6 Replies)
Discussion started by: laho
6 Replies

2. Programming

differeEEK!nce between static and dynamic linking

hello, friends i would like to know what is the differnce between static library and dynamic library? How will u create them and what are there uses? (1 Reply)
Discussion started by: vijaya2006
1 Replies

3. Programming

dynamic linking of folder name in makefile

i will tell my problem with example: if i have a folder name called sree1.7.3 i know the starting name say sree and also path say /usr/lib. so i want the folder name. and how can i link this folder in makefile thank u sree (1 Reply)
Discussion started by: phani_sree
1 Replies

4. HP-UX

HP-UX 10.xx Changing from static IP to DHCP

***Newbie alert*** What's the easiest way to accomplish this? An admin left our company and I have taken over his HP Workstation and moved it to a different location that is on a different IP segment. I have performed a number of google searches but the steps I have followed haven't worked. ... (1 Reply)
Discussion started by: Steelysteel
1 Replies

5. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

6. IP Networking

I need HELP to Set up Coyote Linux router with 1 static IP & 64 internal static IP

hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first. ... (0 Replies)
Discussion started by: dlwoaud
0 Replies

7. Programming

Adding a Static Library (libtimer.a) to the Makefile

Hi, The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library: Makefile:- It produces "usbserial" executable. Thanks, S (1 Reply)
Discussion started by: suryaemlinux
1 Replies

8. Programming

Static and Shared Library in Makefile

I am having a devil of a time with a very simple make file. The program needs two shared and one static library. If I link the shared libraries only like below the mysql test app works ... (1 Reply)
Discussion started by: jadsys
1 Replies

9. Shell Programming and Scripting

Help understanding makefile: static pattern rules

Hi all, I'm reading the GNU Make book I cannot understand the following syntax from the book. objects = foo.o bar.o all : $(objects) $(objects) : %.o : %.c $(CC) -c $(CFLAGS) $< -o $@ If I run: make, I get the output: cc -c foo.c cc -o foo foo.o I think I... (3 Replies)
Discussion started by: santiagorf
3 Replies
MAKE(1) 						      General Commands Manual							   MAKE(1)

make - a program for maintaining large programs SYNOPSIS
make [-f file] [-iknpqrst] [option] ... [target] OPTIONS
-f Use file as the makefile -i Ignore status returned by commands -k On error, skip to next command -n Report, but do not execute -p Print macros and targets -q Question up-to-dateness of target -r Rule inhibit; do not use default rules -s Silent mode -t Touch files instead of making them EXAMPLES
make kernel # Make kernel up to date make -n -f mfile # Tell what needs to be done DESCRIPTION
Make is a program that is normally used for developing large programs consisting of multiple files. It keeps track of which object files depend on which source and header files. When called, it does the minimum amount of recompilation to bring the target file up to date. The file dependencies are expected in makefile or Makefile , unless another file is specified with -f. Make has some default rules built in, for example, it knows how to make .s files from .c files. Here is a sample makefile . d=/user/ast # d is a macro program: head.s tail.s# program depends on these cc -o program head.s tail.s# tells how to make program echo Program done. # announce completion head.s: $d/def.h head.c # head.s depends on these tail.s: $d/var.h tail.c # tail.s depends on these A complete description of make would require too much space here. Many books on UNIX discuss make . Study the numerous Makefiles in the MINIX source tree for examples. SEE ALSO
cc(1). MAKE(1)

Featured Tech Videos

All times are GMT -4. The time now is 12:24 PM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy