forked from dnschneid/crouton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (31 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
TARGET = crouton
TARGETTMP = .$(TARGET).tmp
WRAPPER = build/wrapper.sh
SCRIPTS := \
$(wildcard chroot-bin/*) \
$(wildcard chroot-etc/*) \
$(wildcard host-bin/*) \
$(wildcard installer/*.sh) installer/functions \
$(wildcard installer/*/*) \
$(wildcard src/*) \
$(wildcard targets/*)
GENVERSION = build/genversion.sh
VERSION = 0
TARPARAMS ?= -j
$(TARGET): $(WRAPPER) $(SCRIPTS) $(GENVERSION) Makefile
sed -e "s/\$$TARPARAMS/$(TARPARAMS)/" \
-e "s/VERSION=.*/VERSION='$(shell $(GENVERSION) $(VERSION))'/" \
$(WRAPPER) > $(TARGETTMP)
tar --owner=root --group=root -c $(TARPARAMS) $(SCRIPTS) >> $(TARGETTMP)
chmod +x $(TARGETTMP)
mv -f $(TARGETTMP) $(TARGET)
croutoncursor: src/cursor.c Makefile
gcc -g -Wall -Werror src/cursor.c -lX11 -lXfixes -lXrender -o croutoncursor
croutonticks: src/ticks.c Makefile
gcc -g -Wall -Werror src/ticks.c -lrt -o croutonticks
clean:
rm -f $(TARGETTMP) $(TARGET) croutoncursor croutonticks
.PHONY: clean