52 lines
1.7 KiB
Makefile
52 lines
1.7 KiB
Makefile
# Makefile -- DOS Accelerated Video Driver Framework
|
|
#
|
|
# DJGPP cross-compilation build matching DVX conventions.
|
|
# Produces demo.exe as the test application.
|
|
|
|
DJGPP_PREFIX = $(HOME)/djgpp/djgpp
|
|
CC = $(DJGPP_PREFIX)/bin/i586-pc-msdosdjgpp-gcc
|
|
CFLAGS = -O2 -Wall -Wextra -Werror -Wno-type-limits -Wno-sign-compare -Wno-format-truncation -march=i486 -mtune=i586
|
|
|
|
OBJDIR = obj
|
|
BINDIR = bin
|
|
|
|
# Source files
|
|
SRCS = pci.c vgaCommon.c accelVid.c s3Trio.c cirrusGd54.c cirrusLaguna.c atiMach64.c tsengW32.c matroxMga.c banshee.c nvidia.c trident.c sis.c demo.c
|
|
OBJS = $(patsubst %.c,$(OBJDIR)/%.o,$(SRCS))
|
|
|
|
TARGET = $(BINDIR)/demo.exe
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJS) | $(BINDIR)
|
|
$(CC) $(CFLAGS) -o $@ $(OBJS)
|
|
|
|
$(OBJDIR)/%.o: %.c | $(OBJDIR)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(OBJDIR):
|
|
mkdir -p $(OBJDIR)
|
|
|
|
$(BINDIR):
|
|
mkdir -p $(BINDIR)
|
|
|
|
# Dependencies
|
|
$(OBJDIR)/pci.o: pci.c pci.h
|
|
$(OBJDIR)/vgaCommon.o: vgaCommon.c vgaCommon.h
|
|
$(OBJDIR)/accelVid.o: accelVid.c accelVid.h pci.h
|
|
$(OBJDIR)/s3Trio.o: s3Trio.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/cirrusGd54.o: cirrusGd54.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/atiMach64.o: atiMach64.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/tsengW32.o: tsengW32.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/matroxMga.o: matroxMga.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/banshee.o: banshee.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/nvidia.o: nvidia.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/trident.o: trident.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/cirrusLaguna.o: cirrusLaguna.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/sis.o: sis.c accelVid.h vgaCommon.h pci.h
|
|
$(OBJDIR)/demo.o: demo.c accelVid.h pci.h
|
|
|
|
clean:
|
|
rm -rf $(OBJDIR) $(BINDIR)
|