help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem making GNU Make 3.81


From: Paul Smith
Subject: Re: Problem making GNU Make 3.81
Date: Thu, 20 Aug 2009 21:31:39 -0600
User-agent: Internet Messaging Program (IMP) H3 (4.1.6)

Quoting "Tovrea, George W \(US SSA\)" <address@hidden>:

The following appears in a Makefile:

OBJS    = alldevices.o
# input/output devices
OBJS-$(CONFIG_ALSA_MUXER)   += alsa-audio-common.o alsa-audio-enc.o

The .c file being compiled contains

#define REGISTER_MUXER(X,x) { \
    extern AVOutputFormat x##_muxer; \
    if(CONFIG_##X##_MUXER)   av_register_output_format(&x##_muxer); }
...
    REGISTER_MUXER (ALSA, alsa);

This results in an "undeclared" error for CONFIG_ALSA_MUXER.

This doesn't have anything to do with make (and is certainly not a "problem making GNU make" as your subject mentions).

I am unfamiliar with the OBJS- line from the make file. What is this
suppose to do? It appears to do nothing in regards to the compile.

It indeed does NOT do anything with regards to the compile, and it's not supposed to. What that does is assign a make variable whose name is constructed from the prefix OBJS- and whatever value the make variable $(CONFIG_ALSA_MUXER) contains.

This looks like a Linux kernel makefile, and although this mailing list is
for help with GNU make and not the Linux kernel, I'll point out that the
way the kernel makefiles work is that the CONFIG_ALSA_MUXER value is
obtained from the .config file generated by the kernel configuration,
and it's assigned to either the value "y", "n", or "m" (meaning "y"es,
include this module in the kernel build, "n"o, do not include it, or
include it as a kernel loadable "m"odule).

Thus, if the value of the variable is "y" then the make variable OBJS-y
would be set to the above value; if "n" then the make variable OBJS-n
would be set, and if "m" then the make variable OBJS-m would be set.

However, this has nothing to do with what the compiler sees when it
compiles the code: it only has to do with WHICH files make decides need
to be compiled, and with what options.

You need to contact someone on an ALSA or Linux kernel list about this
issue; it's not a make issue.

Cheers!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]