From: David Schleef Date: Tue, 12 Jun 2001 10:36:25 +0000 (+0000) Subject: fixes for cross-compilation X-Git-Tag: r0_7_16~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0bd291780ced33cc6b3cc685f96bcd802b7aff33;p=comedilib.git fixes for cross-compilation --- diff --git a/Makefile b/Makefile index 1ba37e6..2d5deab 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,12 @@ MAJOR=0 CFLAGS = -Wall -O2 +CROSS := +CC := $(CROSS)gcc +AR := $(CROSS)ar +LD := $(CROSS)ld +INSTALL := install + TARGETS = comedilib ifeq ($(with_python),yes) TARGETS += python diff --git a/lib/Makefile b/lib/Makefile index 35b1a5a..d8d13fb 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,9 +5,9 @@ OBJS=comedi.o timer.o sv.o range.o ioctl.o filler.o timed.o error.o \ dio.o data.o get.o cmd.o buffer.o libcomedi.a: $(OBJS) - #gcc -shared -Wl,-soname,libcomedi.so,-T,version_script -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm - gcc -shared -Wl,-soname,libcomedi.so.0 -o libcomedi.so.${version} $(OBJS) -lm - ar rs libcomedi.a $(OBJS) + #$(CC) -shared -Wl,-soname,libcomedi.so,-T,version_script -o libcomedi.so.${VERSION_CODE} $(OBJS) -lm + $(CC) -shared -Wl,-soname,libcomedi.so.0 -o libcomedi.so.${version} $(OBJS) -lm + $(AR) rs libcomedi.a $(OBJS) ln -sf libcomedi.so.${version} libcomedi.so ln -sf libcomedi.so.${version} libcomedi.so.0 diff --git a/testing/Makefile b/testing/Makefile index 847c31b..dd59cae 100644 --- a/testing/Makefile +++ b/testing/Makefile @@ -2,12 +2,12 @@ CFLAGS =-I ../include -I . -O2 -Wall -Wstrict-prototypes -LDFLAGS=-L../lib/ -lcomedi -static +LDFLAGS=-L../lib/ -lcomedi -lm -static TARG=comedi_test OBJS=main.o mode0_read.o insn_read.o info.o cmd_1.o insn_read_time.o \ - cmd_2.o mmap.o select.o cmd_3.o bufconfig.o lib.o + cmd_2.o mmap.o select.o cmd_3.o bufconfig.o lib.o inttrig.o all: $(TARG)