summaryrefslogtreecommitdiff
path: root/apps/codecs/dumb/make/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/dumb/make/Makefile.inc')
-rw-r--r--apps/codecs/dumb/make/Makefile.inc34
1 files changed, 34 insertions, 0 deletions
diff --git a/apps/codecs/dumb/make/Makefile.inc b/apps/codecs/dumb/make/Makefile.inc
new file mode 100644
index 0000000000..4137b04804
--- /dev/null
+++ b/apps/codecs/dumb/make/Makefile.inc
@@ -0,0 +1,34 @@
1# This file contains the main rules for compiling the library. It is included
2# twice with different values for CFLAGS and OBJDIR, so the optimised and
3# debugging libraries are both built.
4
5CORE_OBJECTS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.c, %.o, $(CORE_MODULES))))
6ALLEGRO_OBJECTS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.c, %.o, $(ALLEGRO_MODULES))))
7
8
9# Pass the current value of CFLAGS through to the commands. Or, more
10# accurately, create a local copy of the current CFLAGS variable. This is
11# necessary because Make doesn't expand variables in commands until they are
12# executed.
13$(CORE_LIB_FILE): CFLAGS := $(CFLAGS)
14$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
15
16
17$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
18 $(CC) -c -o $@ $< $(CFLAGS)
19
20$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
21 $(CC) -c -o $@ $< $(CFLAGS)
22
23$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
24 $(CC) -c -o $@ $< $(CFLAGS)
25
26$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
27 include/internal/aldumb.h include/internal/dumb.h
28 $(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
29
30$(CORE_LIB_FILE): $(CORE_OBJECTS)
31 $(AR) rs $@ $^
32
33$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
34 $(AR) rs $@ $^