annotate Makefile.gen @ 34:c0b85b0615d2

Improve the makefiles.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 26 Nov 2019 07:17:49 +0200
parents
children d0cd281934a3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
34
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 CFLAGS ?= -O3 -W -Wall -DGL_GLEXT_PROTOTYPES -std=c++11
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 LDFLAGS ?=
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 CFLAGS += $(SDL_CFLAGS) $(GL_CFLAGS)
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 TARGETS = gldragon$(BINEXT) ply2bin$(BINEXT)
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 all: $(TARGETS)
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 %.o: %.cpp %.h
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 $(CXX) $(CFLAGS) -c -o $@ $<
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 %.o: %.cpp
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 $(CXX) $(CFLAGS) -c -o $@ $<
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 gldragon$(BINEXT): gldragon.o dmmodel.o dmutil.o
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 $(CXX) -o $@ $+ $(LDFLAGS) $(SDL_LDFLAGS) $(GL_LDFLAGS)
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 ply2bin$(BINEXT): ply2bin.o dmmodel.o dmutil.o
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 $(CXX) -o $@ $+ $(LDFLAGS)
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 clean:
c0b85b0615d2 Improve the makefiles.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 $(RM) $(TARGETS) *.o