mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-22 11:51:17 +00:00
108 lines
2.2 KiB
Makefile
108 lines
2.2 KiB
Makefile
########################################################################
|
|
#
|
|
# Quake general stuff
|
|
#
|
|
|
|
top_builddir = ..
|
|
PROJECT_DIR := @top_srcdir@
|
|
BIN_PREFIX := common
|
|
SRC_DIR := @srcdir@
|
|
MODULE := common
|
|
OBJ_PATTERN = $(BUILD_DIR)/sound_lib/%.o $(BUILD_DIR)/common_lib/%.o
|
|
|
|
include $(top_builddir)/Rules.mk
|
|
|
|
SOUND_LIB := sound_lib.a
|
|
|
|
lib_targets = $(SOUND_LIB) $(CD_LIB) $(COMMON_LIB)
|
|
targets = $(lib_targets)
|
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
|
|
.PHONY: $(targets) $(CLEAN_TARGETS)
|
|
|
|
all: $(targets)
|
|
########################################################################
|
|
#
|
|
# Source files
|
|
#
|
|
|
|
ifeq ($(ASM_ARCH),i386)
|
|
# 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
|
|
#
|
|
|
|
# Sound lib targets..
|
|
|
|
SOUND_LIB_OBJS = $(patsubst %,$(BUILD_DIR)/sound_lib/%,$(addsuffix \
|
|
.@OBJEXT@, $(basename $(SOUND_SRC) .c .s)))
|
|
|
|
$(SOUND_LIB): $(TARGET_DIR)/sound_lib.a
|
|
|
|
$(TARGET_DIR)/sound_lib.a: $(SOUND_LIB_OBJS)
|
|
ar cru $@ $(SOUND_LIB_OBJS)
|
|
@RANLIB@ $@
|
|
|
|
###########################################################################
|
|
#
|
|
# Misc targets
|
|
#
|
|
|
|
distclean: clean
|
|
rm -f Makefile
|
|
|
|
$(CLEAN_TARGETS):
|
|
rm -f $(TARGET_DIR)/$(subst clean-,,$@)
|
|
|
|
clean: $(CLEAN_TARGETS)
|
|
-rm -rf $(BUILD_DIR)
|
|
|
|
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
|