--- Makefile.mdk 2006-09-09 01:49:43.000000000 +0200 +++ Makefile 2006-09-09 11:43:40.000000000 +0200 @@ -23,7 +23,7 @@ endif KINCLUDES:=$(KSRC)/include -CFLAGS+=-I. -O4 -g -Wall -DBUILDING_TONEZONE #-DTONEZONE_DRIVER +CFLAGS+=-I. $(RPM_OPT_FLAGS) -DBUILDING_TONEZONE #-DTONEZONE_DRIVER CFLAGS_PPC:=$(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) CFLAGS_X86-64:=$(shell if uname -m | grep -q x86_64; then echo "-m64"; fi) CFLAGS+=$(CFLAGS_PPC) $(CFLAGS_X86-64) @@ -137,9 +137,9 @@ all: $(BUILDVER) $(LIBTONEZONE_SO) -linux24: prereq $(MODULESO) wct4xxp/wct4xxp.o $(BINS) +linux24: prereq $(MODULESO) wct4xxp/wct4xxp.o -linux26: prereq $(BINS) +linux26: prereq @echo $(KSRC) @if [ -z "$(KSRC)" -o ! -d "$(KSRC)" ]; then echo "You do not appear to have the sources for the $(KVERS) kernel installed."; exit 1 ; fi $(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules @@ -185,13 +185,13 @@ $(CC) $(CFLAGS) -o $@ $^ -lpci zonedata.lo: zonedata.c - $(CC) -c $(LCFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -c $(LCFLAGS) -o $@ $^ tonezone.lo: tonezone.c - $(CC) -c $(LCFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -c $(LCFLAGS) -o $@ $^ torisatool: torisatool.o - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ tones.h: gendigits ./gendigits > $@ @@ -203,7 +203,7 @@ ./makefw pciradio.rbt radfw > radfw.h gendigits: gendigits.o - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm zaptel.c: tones.h @@ -216,19 +216,19 @@ ztmonitor.o: ztmonitor.c zaptel.h ztspeed.o: ztspeed.c - $(CC) -o $@ -c $^ + $(CC) $(CFLAGS) -o $@ -c $^ zttool: zttool.o - $(CC) -o $@ $^ -lnewt + $(CC) $(CFLAGS) -o $@ $^ -lnewt ztmonitor: ztmonitor.o - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ ztspeed: ztspeed.o - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ sethdlc-new: sethdlc-new.o - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ sethdlc-new.o: sethdlc-new.c $(CC) -o $@ -c $(CFLAGS) -I$(KINCLUDES) $^ @@ -237,45 +237,48 @@ ar rcs libtonezone.a $^ $(LIBTONEZONE_SO): $(TZOBJS) - $(CC) -shared -Wl,-soname,$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) -lm -o $@ $^ + $(CC) $(CFLAGS) -shared -Wl,-soname,$(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) \ + -lm -o $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) $^ + ln -snf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER) + ln -snf $(LIBTONEZONE_SO).$(LIBTONEZONE_SO_MAJOR_VER).$(LIBTONEZONE_SO_MINOR_VER) $(LIBTONEZONE_SO) ztcfg.c: ztcfg.h ztcfg-shared: ztcfg.o $(LIBTONEZONE_SO) - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm ztcfg: ztcfg.o libtonezone.a - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm ztcfg-dude: ztcfg-dude.o mknotch.o complex.o $(LIBTONEZONE_SO) - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm mknotch.o: mknotch.cc - $(CC) -o $@ -c $^ + $(CC) $(CFLAGS) -o $@ -c $^ complex.o: complex.cc - $(CC) -o $@ -c $^ + $(CC) $(CFLAGS) -o $@ -c $^ usbfxstest.o: usbfxstest.c - $(CC) -o $@ -g -c $^ + $(CC) $(CFLAGS) -o $@ -g -c $^ usbfxstest: usbfxstest.o - $(CC) -o $@ $^ -lzap + $(CC) $(CFLAGS) -o $@ $^ -lm -lzap fxstest: fxstest.o $(LIBTONEZONE_SO) - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm fxotune: fxotune.o - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm fxsdump: fxsdump.o - $(CC) -o $@ $^ -lm + $(CC) $(CFLAGS) -o $@ $^ -lm stackcheck: checkstack $(BUILDVER) ./checkstack *.o ztdiag: ztdiag.o - $(CC) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ devices: ifndef DYNFS