--- lshw-B.02.08.01/src/Makefile +++ lshw-B.02.08.01/src/Makefile @@ -13,11 +13,13 @@ export MANDIR export DATADIR -CXX=c++ +CXX ?= c++ INCLUDES=-I./core/ DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS=-g -Wall -g $(INCLUDES) $(DEFINES) -LDFLAGS=-L./core/ -g +CXXFLAGS ?= -g -Os +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) +LDFLAGS ?= -s +LDFLAGS += -L./core/ ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif @@ -48,7 +49,6 @@ $(PACKAGENAME)-static: core core/lib$(PACKAGENAME).a $(PACKAGENAME).o $(CXX) $(LDSTATIC) $(LDFLAGS) -o $@ $(PACKAGENAME).o $(LIBS) - strip $@ .PHONY: compressed compressed: $(PACKAGENAME)-compressed @@ -73,7 +73,7 @@ install: all $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) - $(INSTALL) -m 0755 -s $(PACKAGENAME) $(DESTDIR)/$(SBINDIR) + $(INSTALL) -m 0755 $(PACKAGENAME) $(DESTDIR)/$(SBINDIR) $(INSTALL) -d -m 0755 $(DESTDIR)/$(MANDIR)/man1 $(INSTALL) -m 0644 $(PACKAGENAME).1 $(DESTDIR)/$(MANDIR)/man1 $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME) @@ -81,7 +81,7 @@ install-gui: gui $(INSTALL) -d -m 0755 $(DESTDIR)/$(SBINDIR) - $(INSTALL) -m 0755 -s gui/gtk-$(PACKAGENAME) $(DESTDIR)/$(SBINDIR) + $(INSTALL) -m 0755 gui/gtk-$(PACKAGENAME) $(DESTDIR)/$(SBINDIR) $(INSTALL) -d -m 0755 $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/artwork $(INSTALL) -m 0644 gui/artwork/*.svg $(DESTDIR)/$(DATADIR)/$(PACKAGENAME)/artwork --- lshw-B.02.08.01/src/core/Makefile +++ lshw-B.02.08.01/src/core/Makefile @@ -1,9 +1,10 @@ PACKAGENAME?=lshw -CXX=c++ +CXX ?= c++ INCLUDES= DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" -CXXFLAGS=-g -Wall -Os $(INCLUDES) $(DEFINES) +CXXFLAGS ?= -g -Os +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) LDFLAGS= LDSTATIC= LIBS= --- lshw-B.02.08.01/src/gui/Makefile +++ lshw-B.02.08.01/src/gui/Makefile @@ -1,16 +1,18 @@ PACKAGENAME?=lshw -CXX=c++ -CC=cc +CXX ?= c++ +CC ?= cc DEFINES=-DPREFIX=\"$(PREFIX)\" -DSBINDIR=\"$(SBINDIR)\" -DMANDIR=\"$(MANDIR)\" -DDATADIR=\"$(DATADIR)\" GTKINCLUDES=$(shell pkg-config gtk+-2.0 --cflags) INCLUDES=-I../core $(GTKINCLUDES) -CXXFLAGS=-g -Wall -Os $(INCLUDES) $(DEFINES) -CFLAGS=$(CXXFLAGS) $(DEFINES) +CXXFLAGS ?= -g -Os +CFLAGS ?= $(CXXFLAGS) +CXXFLAGS += -Wall $(INCLUDES) $(DEFINES) +CFLAGS += -Wall $(INCLUDES) $(DEFINES) GTKLIBS=$(shell pkg-config gtk+-2.0 --libs) LIBS=-L../core -llshw $(GTKLIBS) -LDFLAGS= -Os -s +LDFLAGS ?= -Os -s ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) LDFLAGS+= -Wl,--as-needed endif @@ -33,7 +35,6 @@ $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) install: all - strip gtk-$(PACKAGENAME) clean: rm -f $(OBJS) gtk-$(PACKAGENAME) gtk-lshw.glade.bak gtk-lshw.gladep.bak interface.c.bak interface.h.bak callbacks.c.bak callbacks.h.bak Makefile.bak