# Makefile for "cyrix" -- a program to set/view the configuration
# registers for the DLC line of Cyrix processors.  (Linux version)
#
# Copyright 1994, 1995 by Paul Gortmaker.
#

CC = gcc
LD = gcc
AS = as

# If you didn't set these in your autoexec.bat file when you installed
# djgpp, you better uncomment these lines. Make sure the path is set
# right for your system. Note the direction of the slashes!!!

CFLAGS = -O2 -Wall -Wstrict-prototypes -m486 -s -N -c
LDFLAGS = -s -N
ASFLAGS =

OBJS = cyrix.o probe.o enable.o disable.o state.o
LIBS = -lc

# Uncomment the following lines for debugging, and comment out 
# the CFLAGS, LDFLAGS and ASFLAGS above.

#DCFLAGS = -O -Wall -Wstrict-prototypes -m486 -g -c
#DLDFLAGS = -g -v
#ASDFLAGS = -g -v

RM = rm -f

# Implicit assembly rule (DOS can't support "*.S" vs. "*.s" - oh well.)

%.o : %.S
	$(AS) $(ASFLAGS) $(ASDFLAGS) $< -o $@

%.o : %.c
	$(CC) $(CFLAGS) $(DCFLAGS) $< -o $@

all: cyrix

cyrix: $(OBJS)
	$(LD) -o cyrix $(LDFLAGS) $(DLDFLAGS) $(OBJS) $(LIBS)

clean:
	$(RM) *.o
	$(RM) core

spotless: clean
	$(RM) cyrix
