quakeforge-old/Rules.mk.in
Bill Currie c492f8145f apply Turo Lamminen's djgpp patch. Thanks for the work, Turo.
Evertying still compiles in linux, but if anything broke, I don't particulary
care at this point :)
2000-08-18 04:30:22 +00:00

70 lines
1.5 KiB
Makefile

#!/usr/bin/make
# The above line is so vim knows that this is a makefile.
COMMON_DIR := $(PROJECT_DIR)/common
TARGET_DIR := $(top_builddir)/targets
BUILD_DIR := $(TARGET_DIR)/$(MODULE)
OBJ_PATTERN += $(BUILD_DIR)/common_lib/%.@OBJEXT@ $(BUILD_DIR)/%.@OBJEXT@
CC := @CC@
LDFLAGS += @LDFLAGS@ @LIBS@
INCLUDES += -I$(srcdir) -I$(COMMON_DIR) @OGL_INCLUDES@ -I$(top_builddir)/common
CFLAGS += @CFLAGS@ -DGLOBAL_CFG_FILE=\"@globalconf@\" $(INCLUDES)
MAKE_SURE_DIR = if test -d "$$DIR"; then \
true; \
else \
echo "Creating directory $$DIR"; \
mkdir -p $$DIR; \
fi
# What do we want to support feature wise..
HAS_MGL = @HAS_MGL@
HAS_GGI = @HAS_GGI@
HAS_SVGA = @HAS_SVGA@
HAS_GLIDE = @HAS_GLIDE@
HAS_TDFXGL = @HAS_TDFXGL@
HAS_OGL = @HAS_OGL@
HAS_XIL = @HAS_XIL@
HAS_X11 = @HAS_X11@
HAS_SDL = @HAS_SDL@
HAS_VGA = @HAS_VGA@
HAVE_WSOCK = @HAVE_WSOCK@
HAVE_UDP = @HAVE_UDP@
# Arch specific stuff..
ASM_ARCH := @ASM_ARCH@
ifeq ($(ASM_ARCH),i386)
# Source file the Intel archictecture only
CFLAGS += -Did386=1
endif
###########################################################################
#
# Compilation rules
#
$(OBJ_PATTERN): $(srcdir)/%.c
@DIR=$(@D); $(MAKE_SURE_DIR)
$(CC) $(CFLAGS) -o $@ -c $<
$(OBJ_PATTERN): $(srcdir)/%.s
@DIR=$(@D); $(MAKE_SURE_DIR)
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<
$(OBJ_PATTERN): $(COMMON_DIR)/%.c
@DIR=$(@D); $(MAKE_SURE_DIR)
$(CC) $(CFLAGS) -o $@ -c $<
$(OBJ_PATTERN): $(COMMON_DIR)/%.s
@DIR=$(@D); $(MAKE_SURE_DIR)
$(CC) $(CFLAGS) -x assembler-with-cpp -o $@ -c $<