annotate Makefile @ 29:5c7f63fe5c19

Clean up Makefile a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 22 Nov 2019 09:28:23 +0200
parents f080349584b8
children 1a0e823283e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
87cb16492d91 Improve Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 6
diff changeset
1 BINEXT ?=
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
2 CFLAGS ?= -O3 -W -Wall -DGL_GLEXT_PROTOTYPES -std=c++11
9
87cb16492d91 Improve Makefile.
Matti Hamalainen <ccr@tnsp.org>
parents: 6
diff changeset
3 LDFLAGS ?=
0
3d74a9dd96e4 Initial import of Thomas Trummer's original code.
Thomas Trummer
parents:
diff changeset
4
29
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
5 SDL2_CFLAGS ?= $(shell pkg-config --cflags sdl2)
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
6 SDL2_LIBS ?= $(shell pkg-config --libs sdl2)
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
7
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
8 GL_CFLAGS ?= $(shell pkg-config --cflags gl glu)
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
9 GL_LIBS ?= $(shell pkg-config --libs gl glu)
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
10
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
11 CFLAGS += $(SDL2_CFLAGS) $(GL_CFLAGS)
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
12
23
f080349584b8 Rename from glxdragon to gldragon.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
13 TARGETS = gldragon$(BINEXT)
3
be31ff9e5f58 Port to libSDL2, clean up the code and some de-C++-ifications.
Matti Hamalainen <ccr@tnsp.org>
parents: 1
diff changeset
14
29
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
15 all: $(TARGETS)
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
16
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
17 %.o: %.cpp %.h
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
18 $(CXX) $(CFLAGS) -c -o $@ $<
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
20 %.o: %.cpp
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
21 $(CXX) $(CFLAGS) -c -o $@ $<
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
22
21
1404dfcee7b8 More work on scenefile and model loading support.
Matti Hamalainen <ccr@tnsp.org>
parents: 19
diff changeset
23
23
f080349584b8 Rename from glxdragon to gldragon.
Matti Hamalainen <ccr@tnsp.org>
parents: 21
diff changeset
24 gldragon$(BINEXT): gldragon.o dmmodel.o dmutil.o
29
5c7f63fe5c19 Clean up Makefile a bit.
Matti Hamalainen <ccr@tnsp.org>
parents: 23
diff changeset
25 $(CXX) -o $@ $+ $(LDFLAGS) $(SDL2_LIBS) $(GL_LIBS)
0
3d74a9dd96e4 Initial import of Thomas Trummer's original code.
Thomas Trummer
parents:
diff changeset
26
3d74a9dd96e4 Initial import of Thomas Trummer's original code.
Thomas Trummer
parents:
diff changeset
27 clean:
19
a329f0216491 Implement PLY file format parsing and extremely simplistic scene setup file format.
Matti Hamalainen <ccr@tnsp.org>
parents: 9
diff changeset
28 $(RM) $(TARGETS) *.o