mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-10 14:42:06 +00:00
69 lines
1.5 KiB
Makefile
69 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@ $(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@
|
|
|
|
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 $<
|
|
|