Debian Codegraph @

src/curses/Makefile

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 # Makefile for Unix Frotz
2 # GNU make is required.
3
4 SOURCES = ux_audio.c ux_audio_none.c ux_audio_oss.c ux_blorb.c ux_init.c \
5 ux_input.c ux_pic.c ux_screen.c ux_text.c
6
7 HEADERS = ux_blorb.h ux_frotz.h ux_setup.h
8
9 DEFINES = ux_defines.h
10
11 OBJECTS = $(SOURCES:.c=.o)
12
13 TARGET = frotz_curses.a
14
15 ARFLAGS = rc
16
17 SOUND_TYPE ?= ao
18
19 UNAME_S := $(shell uname -s)
20
21 ifeq ($(SOUND_TYPE), ao)
22 ifneq ($(UNAME_S),Haiku)
23 CFLAGS += -pthread
24 ifeq ($(UNAME_S),Darwin)
25 HOMEBREW_PREFIX ?= $(shell brew --prefix)
26 CFLAGS += -I$(HOMEBREW_PREFIX)/include
27 endif
28 endif
29 else ifeq ($(SOUND_TYPE), none)
30
31 else ifndef SOUND_TYPE
32
33 else
34 $(error Invalid sound choice $(SOUND_TYPE))
35 endif
36
37 $(TARGET): $(DEFINES) $(OBJECTS) | $(DEFINES)
38 $(AR) $(ARFLAGS) $@ $(OBJECTS)
39 $(RANLIB) $@
40 @echo "** Done with curses interface."
41
42 $(DEFINES):
43 @echo "** Generating $@"
44 @echo "/* This file was automatically generated by the build process. */" > $@
45 @echo "/* These are defines specific to the curses interface. */" >> $@
46 @echo >> $@
47 @echo "#ifndef UX_CURSES_DEFINES_H" >> $@
48 @echo "#define UX_CURSES_DEFINES_H" >> $@
49 @echo "#define $(CURSES_DEFINE)" >> $@
50 @echo "#define CONFIG_DIR \"$(SYSCONFDIR)\"" >> $@
51
52 ifeq ($(SOUND_TYPE),none)
53 @echo "#define NO_SOUND" >> $@
54 else
55 @echo "#define SOUND_TYPE \"$(SOUND_TYPE)\"" >> $@
56 @echo "#define SAMPLERATE $(SAMPLERATE)" >> $@
57 @echo "#define BUFFSIZE $(BUFFSIZE)" >> $@
58 @echo "#define DEFAULT_CONVERTER $(DEFAULT_CONVERTER)" >> $@
59 endif
60
61 ifdef COLOR
62 @echo "#define COLOR_SUPPORT" >> $@
63 endif
64 ifdef ITALIC
65 @echo "#define ITALIC_SUPPORT" >> $@
66 endif
67 @echo "#endif /* UX_CURSES_DEFINES_H */" >> $@
68
69
70
71 clean:
72 rm -f $(TARGET) $(OBJECTS) $(DEFINES)
73
74 %.o: %.c $(DEFINES)
75 $(CC) $(CFLAGS) $(CURSES_CFLAGS) $(NO_SOUND) -fPIC -fpic -o $@ -c $<
76
•77 .PHONY: clean
78 .DELETE_ON_ERROR: