2000-03-24 13:34:14 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# common/Makefile.in
|
|
|
|
#
|
|
|
|
# common makefile
|
|
|
|
#
|
|
|
|
# Copyright (C) 1996-1997 Id Software, Inc.
|
|
|
|
# Copyright (C) 1999,2000 contributors of the QuakeForge project
|
|
|
|
# Please see the file "AUTHORS" for a list of contributors
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
#
|
|
|
|
# See the GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to:
|
|
|
|
#
|
|
|
|
# Free Software Foundation, Inc.
|
|
|
|
# 59 Temple Place - Suite 330
|
|
|
|
# Boston, MA 02111-1307, USA
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
2000-01-27 17:06:02 +00:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# Quake general stuff
|
|
|
|
#
|
|
|
|
|
2000-08-18 04:30:22 +00:00
|
|
|
SHELL = @SHELL@
|
|
|
|
|
2000-03-15 01:09:48 +00:00
|
|
|
srcdir = @srcdir@
|
|
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
prefix = @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
|
|
|
|
bindir = @bindir@
|
|
|
|
datadir = @datadir@
|
|
|
|
|
2000-03-07 23:13:00 +00:00
|
|
|
top_builddir = ..
|
2000-03-15 01:09:48 +00:00
|
|
|
PROJECT_DIR := ${top_srcdir}
|
2000-01-27 17:06:02 +00:00
|
|
|
BIN_PREFIX := common
|
2000-03-06 13:26:42 +00:00
|
|
|
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-03-15 01:09:48 +00:00
|
|
|
targets =
|
|
|
|
CLEAN_TARGETS = $(patsubst %,clean-%, $(lib_targets) $(targets))
|
|
|
|
.PHONY: $(lib_targets) $(targets) $(CLEAN_TARGETS)
|
2000-01-27 17:06:02 +00:00
|
|
|
|
2000-03-15 01:09:48 +00:00
|
|
|
all: $(lib_targets) $(targets)
|
2000-01-27 17:06:02 +00:00
|
|
|
########################################################################
|
|
|
|
#
|
|
|
|
# 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
|
2000-08-18 04:30:22 +00:00
|
|
|
ifeq ($(SOUND_STYLE),DJGPP)
|
|
|
|
SOUND_SRC += snd_dma.c snd_dos.c snd_gus.c
|
|
|
|
endif
|
2000-01-27 17:06:02 +00:00
|
|
|
ifeq ($(SOUND_STYLE),NULL)
|
|
|
|
SOUND_SRC += snd_null.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
SOUND_SRC += snd_mem.c snd_mix.c
|
|
|
|
|
|
|
|
# Networking source files
|
|
|
|
|
2000-04-17 19:28:42 +00:00
|
|
|
QW_NET_SRC = @NET_SOURCE@ net_com.c mdfour.c
|
2000-01-27 17:06:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
#
|
|
|
|
# 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)
|
2000-03-23 22:44:33 +00:00
|
|
|
for i in x-dummy $(targets); do \
|
2000-03-23 23:04:48 +00:00
|
|
|
if test "$$i" != x-dummy; then \
|
2000-03-23 22:44:33 +00:00
|
|
|
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
|
|
|
|
$(DESTDIR)/$(bindir)/$$i; \
|
|
|
|
fi \
|
2000-01-27 17:06:02 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
check:
|
|
|
|
@echo check not implemented
|