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

BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [jjk@mathstar.com] (fwd)



>From owner-rtl Mon May  7 12:34:43 2001
Received: from osiris2.2ndAve.mpls.orbis.net (root@osiris2.2ndAve.mpls.orbis.net [206.196.46.99])
	by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f47IYgJ15442
	for <rtl@fsmlabs.com>; Mon, 7 May 2001 12:34:43 -0600
Received: from winserve04.mathstar.com ([209.173.195.158])
	by osiris2.2ndAve.mpls.orbis.net (8.9.0/8.9.0) with ESMTP id NAA25576
	for <rtl@fsmlabs.com>; Mon, 7 May 2001 13:30:38 -0500 (CDT)
From: jjk@mathstar.com
content-class: urn:content-classes:message
Subject: RE: [rtl] Make file.
Date: Mon, 7 May 2001 13:30:37 -0500
MIME-Version: 1.0
Message-ID: <2BC17A9BEEA43D48B3596DE984255B210C5BCD@winserve04.mathstar.com>
To: <rtl@fsmlabs.com>
Content-Type: text/plain;
Content-Transfer-Encoding: quoted-printable

Dont you have to compile with the -c option to make a module?  I dont
see that anywhere down there.


-----Original Message-----
From:	Tony Denault
Sent:	Fri 5/4/2001 1:06 AM
To:	rtl@fsmlabs.com
Cc:
Subject:	[rtl] Make file.


I've installed rtlinux 3.0 on a 2.2.18 (slackware) kernel. I was able to
write and run a program that create periodic thread and write to a rtl
fifo. My next step was to break up the source into muliple files:
  lp_mod.c - module load/cleanup
  lp_main.c - start of new thread
  myrt_io.c - some support function.

The created the following makefile:

RTINCLUDE = -I/usr/src/rtlinux/linux/include
-I/usr/src/rtlinux-3.0/include
            -I/usr/src/rtlinux-3.0/include/compat
-I/usr/src/rtlinux-3.0/include/posix
INCLUDE =  $(RTINCLUDE) -I../include
CFLAGS  = -D__KERNEL__ -Wall -Wstrict-prototypes -fno-strict-aliasing
-D__SMP__
   -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2
    -malign-functions=2 -DCPU=686 -g -D__RTL__ -D_LOOSE_KERNEL_NAMES
    -O2 $(INCLUDE)
CC = gcc

all: lp.o

lp.o: lp_mod.o lp_main.o mrt_io.o
   ld -r -o lp.o lp_mod.o lp_main.o mrt_io.o

lp_mod.o: lp_mod.c
   $(CC) $(CFLAGS) -DMODULE -c lp_mod.c

lp_main.o: lp_main.c
   $(CC) $(CFLAGS) -c lp_main.c

mrt_io.o: mrt_io.c
   $(CC) $(CFLAGS) -c mrt_io.c

clean:
   rm -f *.o


The problem? I can't create a good loadable module? Either I am
missing module information, can find stuff like stdio, can't compile due
to multiple define in system header...very frustrating. I'm not a
makefile
expert, but have been doing C / Linux program for a number of years.

Any advice on make, order of #includes<>, etc, is appreciated..

Tony

/-----------------------------------------------------------------------
------\
| Tony Denault                        | Internet:
denault@irtf.ifa.hawaii.edu |
| NASA IRTF, Institute of Astronomy   |                 Phone: (808)
974-4206 |
| 1175 Manono St., Bldg 393           |                   Fax: (808)
974-4207 |
| Hilo, Hawaii 96720                  |
|
\-----------------------------------------------------------------------
------/



-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/



----Admin Comment----

Content-Type: application/ms-tnef;
	name="winmail.dat"
Content-Transfer-Encoding: base64

what is and who needs winmail.dat ? 
what ever it was I removed it, pleas drop these littl M$-gimics
I guess they are only usable for wasting bandwidth and triggering
paranoid admins virus-scanners :) 

thx !
hofrat