#!/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$ ######################################################################## # # Quake general stuff # SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ top_builddir = .. PROJECT_DIR := ${top_srcdir} BIN_PREFIX := common 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 = CLEAN_TARGETS = $(patsubst %,clean-%, $(lib_targets) $(targets)) .PHONY: $(lib_targets) $(targets) $(CLEAN_TARGETS) all: $(lib_targets) $(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),DJGPP) SOUND_SRC += snd_dma.c snd_dos.c snd_gus.c endif ifeq ($(SOUND_STYLE),NULL) SOUND_SRC += snd_null.c endif SOUND_SRC += snd_mem.c snd_mix.c # Networking source files QW_NET_SRC = @NET_SOURCE@ 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 x-dummy $(targets); do \ if test "$$i" != x-dummy; then \ $(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \ $(DESTDIR)/$(bindir)/$$i; \ fi \ done check: @echo check not implemented