Rithmisis se Makefile [ win modem ]
Panagiotis
pm5885 at internet.gr
Fri Feb 2 11:51:01 EET 2001
exo ena modem tis PCTel to opoio opos leei i pctel mporei na treksei se
linux me ti xrisi twn drivers pou dinei sto cd..
epeidi oi gnoseis mou einai poli mikres den exo kateferei na to kano na
doulepsei akoma,,
poio kato paratheto to makefile..
ta dirs einai kapos etsi
-include/hal.h , pctel.h
/root -src/module/makefile , ptmodule.c
-lib/control.a , dsp.a , hal.a , ptserial.a
to makefile:
#
# Makefile for the PCtel module
#
# Note! The CFLAGS definition is now inherited from the
# parent makefile.
#
HPATH = ../../include
FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
HOSTCC =gcc -I$(HPATH)
HOSTCFLAGS =-O -fomit-frame-pointer
CROSS_COMPILE =
COL_DEBUG_FLAGS =
AS =$(CROSS_COMPILE)as
LD =$(CROSS_COMPILE)ld
CC =$(CROSS_COMPILE)gcc -D__KERNEL__ -DMODULE -Wall $(HOSTCFLAGS) -I$(HPATH)
${COL_DEBUG_FLAGS}
CPP =$(CC) -E
AR =$(CROSS_COMPILE)ar
NM =$(CROSS_COMPILE)nm
STRIP =$(CROSS_COMPILE)strip
MAKE =make
EXTRA_LDFLAGS :=
# object files directory
O_TARGET := ../../lib/pctel.o
# object files
O_OBJS := \
ptmodule.o \
OX_OBJS := \
../../lib/control.a \
../../lib/hal.a \
../../lib/dsp.a \
../../lib/ptserial.a
all_targets: $(O_TARGET) $(L_TARGET)
%.s: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -S $< -o $@
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
%.o: %.s
$(AS) $(ASFLAGS) $(EXTRA_CFLAGS) -o $@ $<
ifdef O_TARGET
ALL_O = $(O_OBJS) $(OX_OBJS)
$(O_TARGET): $(ALL_O) Makefile
rm -f $@
$(LD) -r $(EXTRA_LDFLAGS) -o $@ $(ALL_O)
endif
clean:
rm -f *.o
ifdef L_TARGET
rm -f $(L_TARGET)
endif
ifdef O_TARGET
rm -f $(O_TARGET)
endif
telos tou makefile...
opos lene i odigies mou bgazei sto dir /root/lib ena file pctel.o to opoio
prepei na to
kano install me to insmod.. alla to insmod mou leei oti to file afto eixe
ginei compile gia pirina 2.2.14 eno aftos pou exo einai 2.2.16 (exo SuSe 7.0
prof)
pou mporo na po sto makefile na to kanei compile gia pirina 2.2.16 ?
isos na ftai kai to /root/src/module/ptmodule.c to opoio paratheto edo..
/*
* For the definition of __module_kernel_version[] so that
* the modem driver can be compatible with various Linux kernel
* versions.
*
* This file is to be linked with the rest of the libraries in
* the distribution package.
*/
#include <linux/version.h>
const char __module_kernel_version[] __attribute__((section(".modinfo"))) =
"kernel_version=" UTS_RELEASE;
#ifdef MODVERSIONS
const char __module_using_checksums[] __attribute__((section(".modinfo"))) =
"using_checksums=1";
#endif
efxaristo, ek ton proteron..
P.S exo dokimasei polles fores na kano allages sta scriptakia alla ola
blakeies ekana.. kai i ipostiriksi apo tin PCTel einai xeiristi!
o driver aftos ipotithetai oti tha kanai output ena file to
/root/lib/pctel.o to opoio na kano setup me to insmod kai meta tha kano
mknod /dev/ttyS15 c 62 79
kai bgainei to /dev/ttyS15
ekei kano
chmod 666 /dev/ttyS15
meta kano ena link
ln -sf /dev/ttyS15 /dev/modem
gia to xreisimopoio me alla programmata opos to kppp ktl..
afta...
kai pali efxaristo gia opoia voithia..
panagiotis
P.S2 sorry gia to terastio minima
More information about the Linux-greek-users
mailing list