diff --git a/Makefile.common b/Makefile.common index c8741b4..b239ad5 100644 --- a/Makefile.common +++ b/Makefile.common @@ -18,11 +18,9 @@ LIBHD_VERSION := $(shell cat $(TOPDIR)/VERSION) LIBHD_MINOR_VERSION := $(shell cut -d . -f 2 $(TOPDIR)/VERSION) LIBHD_MAJOR_VERSION := $(shell cut -d . -f 1 $(TOPDIR)/VERSION) -RPM_OPT_FLAGS ?= -O2 - CC ?= gcc LD = ld -CFLAGS += $(RPM_OPT_FLAGS) -Wall -Wno-pointer-sign -pipe -g $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd +CFLAGS += -Wall -Wno-pointer-sign $(SHARED_FLAGS) $(EXTRA_FLAGS) -I$(TOPDIR)/src/hd SHARED_FLAGS = -fPIC -fvisibility=hidden LDFLAGS += -Lsrc diff --git a/src/Makefile b/src/Makefile index 587edd5..e088a54 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,7 +12,7 @@ include $(TOPDIR)/Makefile.common #endif $(LIBHD): $(OBJS) - ar r $@ $? + $(AR) r $@ $? @rm -f $(LIBHD_D) ifdef SHARED_FLAGS diff --git a/src/hd/Makefile b/src/hd/Makefile index 64d8a5c..125ab7b 100644 --- a/src/hd/Makefile +++ b/src/hd/Makefile @@ -8,4 +8,4 @@ version.h: $(TOPDIR)/VERSION @echo "#define HD_VERSION_STRING \"`cat $(TOPDIR)/VERSION`\"" >$@ $(LIBHD_D): $(OBJS) - ar r $(LIBHD) $? + $(AR) r $(LIBHD) $? diff --git a/src/ids/Makefile b/src/ids/Makefile index 473ec3f..115d449 100644 --- a/src/ids/Makefile +++ b/src/ids/Makefile @@ -48,10 +48,10 @@ endif IDFILES += src/pci src/storage src/sound src/mouse src/braille $(LIBHD_D): hd_ids.o - ar r $(LIBHD) $? + $(AR) r $(LIBHD) $? check_hd: check_hd.c - $(CC) $(CFLAGS) $< -o $@ + $(CC) $(LDFLAGS) $(CFLAGS) $< -o $@ hd_ids.c: hd_ids.h hd_ids_tiny.h diff --git a/src/isdn/Makefile b/src/isdn/Makefile index 5e52e6b..d0d6737 100644 --- a/src/isdn/Makefile +++ b/src/isdn/Makefile @@ -5,5 +5,5 @@ SUBDIRS = cdb include $(TOPDIR)/Makefile.common $(LIBHD_D): $(OBJS) - ar r $(LIBHD) $? + $(AR) r $(LIBHD) $? diff --git a/src/smp/Makefile b/src/smp/Makefile index bcba090..9722da1 100644 --- a/src/smp/Makefile +++ b/src/smp/Makefile @@ -4,4 +4,4 @@ TARGETS = $(LIBHD_D) include $(TOPDIR)/Makefile.common $(LIBHD_D): $(OBJS) - ar r $(LIBHD) $? + $(AR) r $(LIBHD) $?