forked from apperian/cctools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (24 loc) · 787 Bytes
/
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
export CC=gcc
export CFLAGS=-O2 -std=gnu99 -Wall -I../include -D_LARGEFILE64_SOURCE -DEMULATED_HOST_CPU_TYPE=CPU_TYPE_I386 -DEMULATED_HOST_CPU_SUBTYPE='CPU_SUBTYPE_INTEL(12, 1)'
GIT_VERSION=$(shell if ( git tag 2>&1 ) > /dev/null; then git tag | tail -n 1; else echo unknown; fi)
ROOT_DIRECTORY_NAME=$(shell basename $${PWD})
DIRS := ar as misc otool
all : $(DIRS)
.PHONY: force
$(DIRS) : force libstuff/libstuff.a
make -C $@
libstuff/libstuff.a : force
make -C libstuff
install :
make -C ar install
make -C as install
make -C misc install
make -C otool install
dist : clean
cd .. && tar cvzf cctools_$(GIT_VERSION).tar.gz --exclude .git $(ROOT_DIRECTORY_NAME)
clean :
make -C ar clean
make -C as clean
make -C misc clean
make -C otool clean
make -C libstuff clean