summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-27 13:10:05 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2016-06-27 13:32:26 -0400
commit489bf6568eebd8a9ed419469f9b31ffd74a170fd (patch)
tree645d432f0aa639ddbd84f9e47eb4b5050f8de1ac /rules.mk
parentedd8e02fffe54daf4fa0d9b9137fb70fe5e31c62 (diff)
downloadtalos-skeleton-489bf6568eebd8a9ed419469f9b31ffd74a170fd.tar.gz
talos-skeleton-489bf6568eebd8a9ed419469f9b31ffd74a170fd.zip
libopenbmc_intf rules simplification
Don't use rules.mk for libopenbmc_intf. There isn't enough overlap here to warrant the extra complexity. Fix an issue where the library is rebuilt for every make invocation. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk12
1 files changed, 3 insertions, 9 deletions
diff --git a/rules.mk b/rules.mk
index c7075c1..dec78b8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -2,17 +2,13 @@ TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
.DEFAULT_GOAL := all
sbindir=/usr/sbin
-libdir=/usr/lib
-includedir=/usr/include
LDLIBS+=$(shell pkg-config --libs $(PACKAGE_DEPS))
ALL_CFLAGS+=$(shell pkg-config --cflags $(PACKAGE_DEPS)) -fPIC -Werror $(CFLAGS)
-INSTALLDEPS?=install-bins
BIN_SUFFIX?=.exe
-DEFAULT_ALL?=$(BINS)
-all: $(DEFAULT_ALL)
+all: $(BINS)
%.o: %.c
$(CC) -c $(ALL_CFLAGS) -o $@ $<
@@ -20,13 +16,11 @@ all: $(DEFAULT_ALL)
$(BINS): %: %.o $(EXTRA_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@$(BIN_SUFFIX) $^ $(LDLIBS)
-install-bins: $(BINS)
+install: $(BINS)
@mkdir -p $(DESTDIR)$(sbindir)
@for b in $(BINS); do \
install $$b$(BIN_SUFFIX) $(DESTDIR)$(sbindir) || exit 1; \
done
-install: all $(INSTALLDEPS)
-
-clean: $(CLEANDEPS)
+clean:
rm -rf *.o $(BINS:=$(BIN_SUFFIX))
OpenPOWER on IntegriCloud