[go: up one dir, main page]

File: Makefile.inc

package info (click to toggle)
libdumb 1%3A0.9.3-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 948 kB
  • ctags: 1,110
  • sloc: ansic: 9,398; makefile: 311; sh: 23
file content (39 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This file contains the main rules for compiling the library. It is included
# twice with different values for CFLAGS and OBJDIR, so the optimised and
# debugging libraries are both built.

CORE_OBJECTS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.c, %.o, $(CORE_MODULES))))
ALLEGRO_OBJECTS := $(addprefix $(OBJDIR)/, $(notdir $(patsubst %.c, %.o, $(ALLEGRO_MODULES))))


# Pass the current value of CFLAGS through to the commands. Or, more
# accurately, create a local copy of the current CFLAGS variable. This is
# necessary because Make doesn't expand variables in commands until they are
# executed.
$(CORE_LIB_FILE): CFLAGS := $(CFLAGS)
$(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)


$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
	$(CC) $(CFLAGS) -c -o $@ $<

$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
	$(CC) $(CFLAGS) -c -o $@ $<

$(OBJDIR)/resample.o: src/helpers/resample.inc src/helpers/resamp2.inc src/helpers/resamp3.inc

$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
	$(CC) $(CFLAGS) -c -o $@ $<

$(OBJDIR)/%.o: src/sigtypes/%.c include/dumb.h
	$(CC) $(CFLAGS) -c -o $@ $<

$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
                      include/internal/aldumb.h include/internal/dumb.h
	$(CC) $(CFLAGS) $(WFLAGS_ALLEGRO) -c -o $@ $<

$(CORE_LIB_FILE): $(CORE_OBJECTS)
	$(AR) rs $@ $^

$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
	$(AR) rs $@ $^