--- tools/qwdtools/source/Makefile.BSD.orig 2011-10-06 07:24:17 UTC +++ tools/qwdtools/source/Makefile.BSD @@ -12,24 +12,18 @@ # MAINDIR = ../../.. -SV_DIR = $(MAINDIR)/source +SV_DIR = $(MAINDIR)/src QWDTOOLS_DIR = $(MAINDIR)/tools/qwdtools/source # To compile qwdtools as 32bit on 64bit target platform use next: # for gcc its like: make qwdtools FORCE32BITFLAGS=-m32 # configure script add FORCE32BITFLAGS=-m32 -DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 -D${BYTE_ORDER}Q__ ${FORCE32BITFLAGS} - -.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly") -DO_CFLAGS += -DKQUEUE -.endif - -WITH_OPTIMIZED_CFLAGS = YES +DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 ${FORCE32BITFLAGS} USE_ASM=-Did386 .if defined(WITH_OPTIMIZED_CFLAGS) -DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops +DO_CFLAGS += -ffast-math -funroll-loops . if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM) ASM=${USE_ASM} DO_CFLAGS += ${ASM} @@ -60,7 +54,7 @@ QWDTOOLS_OBJS = \ ${QWDTOOLS_DIR}/sync.o \ ${QWDTOOLS_DIR}/tools.o -.if ${USE_ASM} == ${ASM} +.if defined(ASM) && ${USE_ASM} == ${ASM} QWDTOOLS_ASM_OBJS = \ ${SV_DIR}/bothtoolsa.o .endif @@ -70,10 +64,10 @@ QWDTOOLS_ASM_OBJS = \ ############################################################################# .c.o: - ${CC} ${DO_CFLAGS} -c $< -o $*.o + ${CC} ${DO_CFLAGS} -c $< -o $@ .s.o: - ${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $*.o + ${CC} ${DO_CFLAGS} -DELF -x assembler-with-cpp -c $< -o $@ all: qwdtools ${STRIP} ${STRIP_FLAGS} qwdtools