From: "Sagar Shinde" <sagar.shinde@patni.com>
To: linux-c-programming@vger.kernel.org
Subject: Error in Makefile for multiple files
Date: Mon, 29 Aug 2005 20:38:05 +0530 [thread overview]
Message-ID: <EGEELICONHJFEACGEOAICEPCCJAA.sagar.shinde@patni.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]
Hi all,
I have a module with 3 C files: smarthook.c restore.c backup.c
My Makefile code is:
-----------------------------------------------------
INCLUDEDIR = /usr/src/kernels/linux-2.6.12.1/include
CFLAGS = -D__KERNEL__ -DMODULE
CFLAGS += -I$(INCLUDEDIR)
TARGET = smarthook
OBJS = $(TARGET).o
SRC = smarthook.c backup.c restore.c
all: .depend $(TARGET).o
$(TARGET).o: $(SRC:.c=.o)
$(LD) -r $^ -o $@
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > $@
-----------------------------------------------------
now though I am giving proper dependencies
why am I not able to access global variables defined in one file
(smarthook.c)
from other files, inspite of these variables being declared extern in other
files.
any suggestions?
Thanks in Advance.
Thanks n Regards,
Sagar Shinde
http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin@patni.com and delete this mail.
_____________________________________________________________________
next reply other threads:[~2005-08-29 15:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-29 15:08 Sagar Shinde [this message]
2005-08-30 8:01 ` Error in Makefile for multiple files Steve Graegert
2005-08-30 18:15 ` K Anandan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=EGEELICONHJFEACGEOAICEPCCJAA.sagar.shinde@patni.com \
--to=sagar.shinde@patni.com \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).