annotate Makefile.unix @ 665:23d16d9cdf96

Work on the build system, split generic UNIX things into Makefile.unix
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 12 Feb 2016 03:05:07 +0200
parents
children dd3083a3383d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
665
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 ## Common UNIX style Makefile stuff
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 PREFIX ?= /usr/local
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 CC ?= cc
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 AR ?= ar
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 RANLIB ?= ranlib
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 INSTALL ?= install
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 DOC ?= README
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 CFLAGS += -DHAVE_CONFIG_H
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 ## Miscellaneous
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 BINPATH ?= ./
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 OBJPATH ?= obj/unix/
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 EXEEXT ?=
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 ENDIANCHK_BIN = $(BINPATH)endianchk$(EXEEXT)
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 NOINST_TARGETS += $(ENDIANCHK_BIN) config.h
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 include Makefile.gen
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 ## Generate endian check and config.h
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 $(ENDIANCHK_BIN): endianchk.c
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 $(CC) $(CFLAGS) -o $@ $+
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 config.h: $(ENDIANCHK_BIN)
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 $(ENDIANCHK_BIN) > $@
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 ## Install targets
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 ##
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 install: all
23d16d9cdf96 Work on the build system, split generic UNIX things into Makefile.unix
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 @for fn in $(TARGETS); do echo " INSTALL $$fn $(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(PREFIX)/bin/; done