1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
# makefile for aylet
# You need an ANSI C compiler. gcc is probably best.
#
CC=gcc
# Compiler options (and sound driver) to use. This one is for Linux,
# and other OSS-using systems.
#
CFLAGS=-O -Wall -DDRIVER_OSS
# for OpenBSD, uncomment this:
#CFLAGS=-O -Wall -DDRIVER_OPENBSD
# Set how to link the curses lib - this is for Linux.
# (Most non-Linux systems will probably want `-lcurses' instead.)
#
CURSES_LIB=-lncurses
# dest for make install
#
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
XBINDIR=$(BINDIR)
MANDIR=$(PREFIX)/man/man1
# if you want the X version to be installed in the usual X executables
# directory, uncomment this (altering if necessary):
#
#XBINDIR=/usr/X11R6/bin
# you shouldn't need to edit the rest
#-----------------------------------------------------------------
# this looks wrong, but *ops.c are actually #include'd by z80.c
OBJS=main.o sound.o ui.o z80.o drv-oss.o drv-obsd.o
XOBJS=main.o sound.o uigtk.o z80.o drv-oss.o drv-obsd.o
all: aylet xaylet
aylet: $(OBJS)
$(CC) -o aylet $(OBJS) $(CURSES_LIB)
xaylet: $(XOBJS)
$(CC) -o xaylet $(XOBJS) `gtk-config --libs`
uigtk.o: uigtk.c
$(CC) $(CFLAGS) `gtk-config --cflags` -c uigtk.c -o uigtk.o
installdirs:
/bin/sh ./mkinstalldirs $(BINDIR) $(XBINDIR) $(MANDIR)
install: installdirs
if [ -f aylet ]; then install -m 755 aylet $(BINDIR); fi
if [ -f xaylet ]; then install -m 755 xaylet $(XBINDIR); fi
install -m 644 aylet.1 $(MANDIR)
ln -sf $(MANDIR)/aylet.1 $(MANDIR)/xaylet.1
uninstall:
$(RM) $(BINDIR)/aylet $(XBINDIR)/xaylet
$(RM) $(MANDIR)/aylet.1* $(MANDIR)/xaylet.1*
clean:
$(RM) *.o *~ aylet xaylet
# dependencies
cbops.o: cbops.c
drv-obsd.o: drv-obsd.c
drv-oss.o: drv-oss.c
edops.o: edops.c
main.o: main.c main.h sound.h ui.h z80.h
sound.o: sound.c main.h z80.h sound.h driver.h
ui.o: ui.c main.h ui.h
uigtk.o: uigtk.c main.h ui.h button1.xpm button2.xpm button3.xpm \
button4.xpm button5.xpm
z80.o: z80.c main.h z80.h z80ops.c cbops.c edops.c
z80ops.o: z80ops.c cbops.c edops.c
VERS=0.5
tgz: ../aylet-$(VERS).tar.gz
../aylet-$(VERS).tar.gz: clean
$(RM) ../aylet-$(VERS)
@cd ..;ln -s aylet aylet-$(VERS)
cd ..;tar zchvf aylet-$(VERS).tar.gz aylet-$(VERS)
@cd ..;$(RM) aylet-$(VERS)
|