75 lines
1.5 KiB
Makefile
75 lines
1.5 KiB
Makefile
# OpenWatcom tests makefile for Glide3
|
|
# This makefile MUST be processed by GNU make!!!
|
|
#
|
|
# Copyright (c) 2004 - Borca Daniel
|
|
# Email : dborca@users.sourceforge.net
|
|
# Web : http://www.geocities.com/dborca
|
|
#
|
|
|
|
#
|
|
# Available options:
|
|
#
|
|
# Environment variables:
|
|
# FX_GLIDE_HW build for the given ASIC (sst1, sst96).
|
|
# default = sst1
|
|
# CPU optimize for the given processor.
|
|
# default = 5s (Pentium, stack)
|
|
# DEBUG=1 disable optimizations and build for debug.
|
|
# default = no
|
|
#
|
|
# Targets:
|
|
# <file.exe> build a specific file
|
|
#
|
|
|
|
.PHONY: all
|
|
.SUFFIXES: .c .obj .exe
|
|
.SECONDARY: tlib.obj fxos.obj
|
|
|
|
FX_GLIDE_HW ?= sst1
|
|
ifeq ($(FX_GLIDE_HW),sst1)
|
|
HWDEF = -DSST1
|
|
else
|
|
ifeq ($(FX_GLIDE_HW),sst96)
|
|
HWDEF = -DSST96
|
|
endif
|
|
endif
|
|
|
|
override FX_HW_BASE = sst1
|
|
TOP = ../../..
|
|
|
|
CC = wcl386
|
|
CFLAGS = -bt=dos -wx
|
|
CFLAGS += -I$(TOP)/$(FX_HW_BASE)/glide3/src -I$(TOP)/$(FX_HW_BASE)/incsrc -I$(TOP)/$(FX_HW_BASE)/init
|
|
CFLAGS += -I$(TOP)/swlibs/fxmisc
|
|
CFLAGS += -D__DOS__ $(HWDEF)
|
|
CFLAGS += -D__DOS32__
|
|
|
|
ifdef DEBUG
|
|
CFLAGS += -od -d2
|
|
else
|
|
CPU ?= 5s
|
|
CFLAGS += -ox -$(CPU)
|
|
endif
|
|
|
|
LDFLAGS = -k16384
|
|
|
|
LDLIBS = $(TOP)/$(FX_HW_BASE)/lib/$(FX_GLIDE_HW)/glide3x.lib
|
|
|
|
# Watcom woes: pass parameters through environment vars
|
|
export WCC386 = $(subst /,\,$(CFLAGS))
|
|
export WCL386 = -zq
|
|
|
|
.c.obj:
|
|
$(CC) -fo=$@ -c $<
|
|
%.exe: tlib.obj %.obj
|
|
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
|
|
|
all:
|
|
$(error Must specify <filename.exe> to build)
|
|
|
|
sbench.exe: sbench.obj fxos.obj tlib.obj
|
|
$(CC) -fe=$@ $(LDFLAGS) $^ $(subst /,\,$(LDLIBS))
|
|
|
|
fxos.obj: $(TOP)/swlibs/fxmisc/fxos.c
|
|
$(CC) -fo=$@ -c $<
|