I see the -c in the compile command in the dependencies. What I
don't see is the -DMODULE in the compile for lp_main, mrt_io.
Hope this helps.
Rich
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 07, 2001 1:31 PM
To: [EMAIL PROTECTED]
Subject: RE: [rtl] Make file.
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: [EMAIL PROTECTED]
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:
[EMAIL PROTECTED] |
| 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 [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
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
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/