Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: Makefile

Issue 6850001: Changes to kplot for ebuild (Closed) Base URL: ssh://gitrw.chromium.org:9222/ktop.git@master
Patch Set: Changes preparing ktop for ebuild. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gnu.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Makefile
diff --git a/Makefile b/Makefile
index 5e439d79985425abb7ad624018dc9b426244ee20..b4a65f623ef6836818fd0820f7cce0ec9b64133f 100644
--- a/Makefile
+++ b/Makefile
@@ -12,17 +12,25 @@
# GNU General Public License for more details.
############################################################################
+makedir := $(dir $(lastword $(MAKEFILE_LIST)))
+include $(makedir)/gnu.mk
+
+ifeq ($(BOARD),)
+ TARGET = $(shell uname -m)
+else
+ TARGET = $(BOARD)
+endif
+
LIBS += -lrt -lm -lpthread -lncurses
INC += -I.
-makedir := $(dir $(lastword $(MAKEFILE_LIST)))
-name := $(basename $(notdir $(PWD)))
+name := $(PN) #$(basename $(notdir $(PWD)))
target := $(shell uname -m)
objdir :=.$(target)
sources := $(wildcard *.c)
objects := $(addprefix $(objdir)/, $(sources:.c=.o))
opus := $(objdir)/$(name)
-bin ?= ~/playbin
+bin = $(DESTDIR)$(sbindir)
# -E stop after preprocessor
# -pg -O -g -DUNOPT -DNDEBUG
@@ -32,6 +40,8 @@ CFLAGS+=-g -Wall -Wstrict-prototypes -Werror \
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
$(.INCLUDES) $(INC) \
+DESTDIR ?= $(bin)
+
$(objdir)/%.o : %.c Makefile
@ mkdir -p $(objdir)
$(CC) $(CFLAGS) -c $< -o $@
@@ -42,6 +52,7 @@ $(opus):$(objects) $(LIBS)
.PHONEY: install clean test
install:
+ mkdir -p $(bin)
cp $(opus) $(bin)
clean:
« no previous file with comments | « no previous file | gnu.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698