Mercurial > hg > dmlib
annotate Makefile @ 2418:8abdd95139d6
Build system cleanups: reordering, more comments.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 14 Jan 2020 03:01:00 +0200 |
parents | 69a5af2eb1ea |
children | 71f04d8e791e |
rev | line source |
---|---|
2418
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
1 ### |
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
2 ### Generic UNIX targets |
8abdd95139d6
Build system cleanups: reordering, more comments.
Matti Hamalainen <ccr@tnsp.org>
parents:
2414
diff
changeset
|
3 ### |
877
4a2ed354ab4c
Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents:
876
diff
changeset
|
4 DMLIB ?= ./ |
886 | 5 BINPATH ?= ./ |
841 | 6 OBJPATH ?= ./obj/unix/ |
7 PREFIX ?= /usr/local | |
877
4a2ed354ab4c
Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents:
876
diff
changeset
|
8 INSTALL ?= install |
4a2ed354ab4c
Use ?= in the Makefiles to accept preset values.
Matti Hamalainen <ccr@tnsp.org>
parents:
876
diff
changeset
|
9 RANLIB ?= ranlib |
841 | 10 |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1432
diff
changeset
|
11 SDL_CFLAGS ?= $(shell pkg-config --cflags sdl2) |
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1432
diff
changeset
|
12 SDL_LDFLAGS ?= $(shell pkg-config --libs sdl2) |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
13 |
1557
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1432
diff
changeset
|
14 SDL_TTF_CFLAGS ?= $(shell pkg-config --cflags SDL2_ttf) |
5e5f75b45f8d
Initial port to SDL2. Many things will not work now.
Matti Hamalainen <ccr@tnsp.org>
parents:
1432
diff
changeset
|
15 SDL_TTF_LDFLAGS ?= $(shell pkg-config --libs SDL2_ttf) |
840
a9d0d35476ae
Add flag variables for SDL_ttf.
Matti Hamalainen <ccr@tnsp.org>
parents:
503
diff
changeset
|
16 |
1398
2791f790497d
Use $(shell ..) instead of backtics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1272
diff
changeset
|
17 TREMOR_CFLAGS ?= $(shell pkg-config --cflags ogg) |
2791f790497d
Use $(shell ..) instead of backtics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1272
diff
changeset
|
18 TREMOR_LDFLAGS ?= /usr/lib/libvorbisidec.a $(shell pkg-config --variable=libdir ogg)/libogg.a |
0 | 19 |
1398
2791f790497d
Use $(shell ..) instead of backtics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1272
diff
changeset
|
20 LIBPNG_CFLAGS ?= $(shell pkg-config --cflags libpng) |
1421
c3bda6e63b00
Stray whitespace at line end.
Matti Hamalainen <ccr@tnsp.org>
parents:
1398
diff
changeset
|
21 LIBPNG_LDFLAGS ?= $(shell pkg-config --libs libpng) |
407
59244a7ae37f
Move c64 utilities to the engine lib, as we benefit from a common framework.
Matti Hamalainen <ccr@tnsp.org>
parents:
355
diff
changeset
|
22 |
1398
2791f790497d
Use $(shell ..) instead of backtics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1272
diff
changeset
|
23 ZLIB_CFLAGS ?= $(shell pkg-config --cflags zlib) |
2791f790497d
Use $(shell ..) instead of backtics.
Matti Hamalainen <ccr@tnsp.org>
parents:
1272
diff
changeset
|
24 ZLIB_LDFLAGS ?= $(shell pkg-config --libs zlib) |
424 | 25 |
0 | 26 |
1432
a9516570cc26
Improve build, so that we can build the tools and tests with minimal
Matti Hamalainen <ccr@tnsp.org>
parents:
1421
diff
changeset
|
27 TOOL_LDFLAGS ?= |
1272 | 28 |
503
f9be2bc8f8ed
It would be nice if the install target would print out what it is actually
Matti Hamalainen <ccr@tnsp.org>
parents:
502
diff
changeset
|
29 include $(DMLIB)Makefile.gen |
502
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
30 |
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
31 |
e1526854e735
Add install target for Unix Makefile that installs tool binaries only, to
Matti Hamalainen <ccr@tnsp.org>
parents:
424
diff
changeset
|
32 install: all |
2110
85f76ec15090
Support DESTDIR for 'make install'.
Matti Hamalainen <ccr@tnsp.org>
parents:
1557
diff
changeset
|
33 @for fn in $(TOOL_TARGETS); do echo " INSTALL $$fn $(DESTDIR)$(PREFIX)/bin/"; $(INSTALL) -m 755 "$$fn" $(DESTDIR)$(PREFIX)/bin/; done |