2000-01-27 17:06:02 +00:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Quake general stuff
|
|
|
|
#
|
|
|
|
|
2000-03-07 23:13:00 +00:00
|
|
|
top_builddir = ..
|
2000-01-27 17:06:02 +00:00
|
|
|
PROJECT_DIR := @top_srcdir@
|
|
|
|
BIN_PREFIX := common
|
2000-03-06 13:26:42 +00:00
|
|
|
SRC_DIR := @srcdir@
|
|
|
|
MODULE := common
|
|
|
|
OBJ_PATTERN = $(BUILD_DIR)/sound_lib/%.o $(BUILD_DIR)/common_lib/%.o
|
2000-01-27 17:06:02 +00:00
|
|
|
|
2000-03-07 23:13:00 +00:00
|
|
|
include $(top_builddir)/Rules.mk
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
SOUND_LIB := sound_lib.a
|
|
|
|
|
2000-02-19 08:24:15 +00:00
|
|
|
lib_targets = $(SOUND_LIB) $(CD_LIB) $(COMMON_LIB)
|
2000-01-27 17:06:02 +00:00
|
|
|
targets = $(lib_targets)
|
|
|
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
|
|
|
.PHONY: $(targets) $(CLEAN_TARGETS)
|
|
|
|
|
|
|
|
all: $(targets)
|
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Source files
|
|
|
|
#
|
|
|
|
|
2000-03-06 13:26:42 +00:00
|
|
|
ifeq ($(ASM_ARCH),i386)
|
2000-01-27 17:06:02 +00:00
|
|
|
# Source file the Intel archictecture only
|
|
|
|
SOUND_SRC += snd_mixa.s
|
|
|
|
endif
|
|
|
|
|
|
|
|
# System specific source files
|
|
|
|
|
|
|
|
CD_AUDIO_SRC = cd_wrapper.c
|
|
|
|
|
|
|
|
# Sound source
|
|
|
|
|
|
|
|
SOUND_STYLE = @SOUND_STYLE@
|
|
|
|
|
|
|
|
ifeq ($(SOUND_STYLE),ALSA)
|
|
|
|
SOUND_SRC += snd_dma.c snd_alsa.c
|
|
|
|
endif
|
|
|
|
ifeq ($(SOUND_STYLE),OSS)
|
|
|
|
SOUND_SRC += snd_dma.c snd_oss.c
|
|
|
|
endif
|
|
|
|
ifeq ($(SOUND_STYLE),Solaris)
|
|
|
|
SOUND_SRC += snd_dma.c snd_sun.c
|
|
|
|
endif
|
|
|
|
ifeq ($(SOUND_STYLE),MME)
|
|
|
|
SOUND_SRC += snd_dma.c snd_mme.c
|
|
|
|
endif
|
|
|
|
ifeq ($(SOUND_STYLE),Windows)
|
|
|
|
SOUND_SRC += snd_dma.c snd_win.c
|
|
|
|
endif
|
|
|
|
ifeq ($(SOUND_STYLE),NULL)
|
|
|
|
SOUND_SRC += snd_null.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
SOUND_SRC += snd_mem.c snd_mix.c
|
|
|
|
|
|
|
|
# Networking source files
|
|
|
|
#
|
|
|
|
# Uncomment the second line to add IPv6 support
|
|
|
|
|
|
|
|
QW_NET_SRC = net_udp.c net_com.c mdfour.c
|
|
|
|
#QW_NET_SRC = net_udp6.c net_com.c mdfour.c
|
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Specific target rules
|
|
|
|
#
|
|
|
|
|
2000-02-12 05:34:22 +00:00
|
|
|
# Sound lib targets..
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
SOUND_LIB_OBJS = $(patsubst %,$(BUILD_DIR)/sound_lib/%,$(addsuffix \
|
|
|
|
.@OBJEXT@, $(basename $(SOUND_SRC) .c .s)))
|
|
|
|
|
2000-03-06 13:26:42 +00:00
|
|
|
$(SOUND_LIB): $(TARGET_DIR)/sound_lib.a
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
$(TARGET_DIR)/sound_lib.a: $(SOUND_LIB_OBJS)
|
|
|
|
ar cru $@ $(SOUND_LIB_OBJS)
|
2000-01-29 23:22:00 +00:00
|
|
|
@RANLIB@ $@
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# Misc targets
|
|
|
|
#
|
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
rm -f Makefile
|
|
|
|
|
|
|
|
$(CLEAN_TARGETS):
|
2000-03-06 13:26:42 +00:00
|
|
|
rm -f $(TARGET_DIR)/$(subst clean-,,$@)
|
2000-01-27 17:06:02 +00:00
|
|
|
|
2000-03-06 13:26:42 +00:00
|
|
|
clean: $(CLEAN_TARGETS)
|
|
|
|
-rm -rf $(BUILD_DIR)
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
install: $(targets)
|
|
|
|
$(PROJECT_DIR)/mkinstalldirs $(DESTDIR)/$(bindir)
|
|
|
|
for i in $(targets); do \
|
|
|
|
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
|
|
|
|
$(DESTDIR)/$(bindir)/$$i; \
|
|
|
|
done
|
|
|
|
|
|
|
|
check:
|
|
|
|
@echo check not implemented
|