Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to do a Makefile

Reply
Thread Tools Display Modes

How to do a Makefile

 
 
Leslie Roger
Guest
Posts: n/a

 
      02-13-2004, 01:40 AM
Helo,

I have installed RH8 in a clone computer. It comes with a built in network
card (Realtek rt8169s/8110). RH8 doesn't come with the drive, so I have
downloaded it. This drive required to be compiled which I don't know how to
do, can someone help me?


The Makefile reads like this:-

# Makefile for a basic kernel module

CC=gcc
MODCFLAGS := -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX
NEW_INCLUDE_PATH=-I /usr/src/linux-2.4.18-3/include/

r8169.o: r8169.c /usr/include/linux/version.h
$(CC) $(MODCFLAGS) $(NEW_INCLUDE_PATH) -c r8169.c

clean:
rm *.o -f


Kind regards,

Leslie


 
Reply With Quote
 
 
 
 
jack
Guest
Posts: n/a

 
      02-13-2004, 10:10 AM
Leslie Roger wrote:
> Helo,
>
> I have installed RH8 in a clone computer. It comes with a built in network
> card (Realtek rt8169s/8110). RH8 doesn't come with the drive, so I have
> downloaded it. This drive required to be compiled which I don't know how to
> do, can someone help me?
>
>
> The Makefile reads like this:-
>
> # Makefile for a basic kernel module
>
> CC=gcc
> MODCFLAGS := -O6 -Wall -DMODULE -D__KERNEL__ -DLINUX
> NEW_INCLUDE_PATH=-I /usr/src/linux-2.4.18-3/include/
>
> r8169.o: r8169.c /usr/include/linux/version.h
> $(CC) $(MODCFLAGS) $(NEW_INCLUDE_PATH) -c r8169.c
>
> clean:
> rm *.o -f


Normally, this driver should come with one of README ond/or INSTALL
text files which will tell You how to install it.

If You don't have such file, most of such packages are handled like:
"./configure", "make", "make install" (the latter is obviously not
present in Your case). If configure is not there, either, edit the
Makefile according to Your needs, especially the path to Your kernel
source. Then, if You don't have make (which You definately should),
You can invoke gcc manually with the options that You see in the
Makefile. - If You don't have gcc or any other compiler, You obviously
cannot compile anything at all on that box. In that case You may have
a different machine that You can compile on, so make the module on
that machine and copy it over to the one in question.

After this, try to load the module with modprobe or insmod. And don't
forget to "depmod -a".


Cheers, Jack.

--
----------------------------------------------------------------------
My personal reading of the string "MicroSoft" expands to "NanoWeak"...
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile missing for .c file. How to create asdf Linux Networking 0 04-15-2009 10:11 PM
running the makefile i got the error message ..... yogesh Linux Networking 2 01-05-2007 10:00 PM
Difference between Freebsd4.11 Makefile and Redhat 9.0 linux yogesh Linux Networking 6 12-30-2006 04:01 PM
How to add more entry in Makefile of NIS? tech11 Linux Networking 0 03-12-2006 10:07 AM



1 2 3 4 5 6 7 8 9 10 11