head	1.7;
access;
symbols
	start:1.1.1.1 uadedev:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2002.01.26.00.25.58;	author shd;	state dead;
branches;
next	1.6;

1.6
date	2002.01.16.13.38.45;	author shd;	state Exp;
branches;
next	1.5;

1.5
date	2002.01.16.13.35.28;	author shd;	state Exp;
branches;
next	1.4;

1.4
date	2002.01.16.09.43.38;	author shd;	state Exp;
branches;
next	1.3;

1.3
date	2002.01.10.12.06.43;	author mld;	state Exp;
branches;
next	1.2;

1.2
date	2001.12.07.13.00.03;	author shd;	state Exp;
branches;
next	1.1;

1.1
date	2001.12.03.23.27.59;	author shd;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.12.03.23.27.59;	author shd;	state Exp;
branches;
next	;


desc
@@


1.7
log
@*** empty log message ***
@
text
@CC	= gcc
LDFLAGS	= 
CTFLAGS	= -fomit-frame-pointer  -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes -DGCCCONSTFUNC="__attribute__((const))" -D_REENTRANT -fno-exceptions -fno-strength-reduce -DREGPARAM= -D__inline__=inline

CFLAGS	= -O2 $(CTFLAGS)

LIBRARIES = -lm -Ldecrunch -ldecr

#NO_SCHED_CFLAGS = -mno-schedule-prologue
NO_SCHED_CFLAGS = 

.SUFFIXES: .a .o .c .h .m .i .S .rc .res

.SECONDARY: cpuemu.c cpustbl.c cputbl.h

INCLUDES=-I. -I./include/ -I../osdep

#cpufast.o instead of cpuemu.o for x86-optimized cpu-emulation
#see also other places: cpuemu.o and cpufast* generation rules
OBJS = main.o newcpu.o memory.o cpuemu.o custom.o cia.o readcpu.o cpudefs.o \
       audio.o compiler.o cpustbl.o missing.o sd-sound.o md-support.o \
       cfgfile.o fpp.o debug.o uade.o amifilemagic.o uade-os-unix.o

all:	decr uade

uade:	$(OBJS)
	$(CC) $(OBJS) -o uade $(LDFLAGS) $(DEBUGFLAGS) $(LIBRARIES) $(MATHLIB)

decr:
	@@ cd decrunch && $(MAKE)

clean:
	-rm -f $(OBJS) *.o uade
	-rm -f gencpu cpudefs.c cpuopti
	-rm -f cpuemu.c build68k cputmp.s cpufast*.s cpustbl.c cputbl.h
	cd decrunch; $(MAKE) clean

build68k: build68k.o
	$(CC) $(LDFLAGS) -o build68k build68k.o
cpuopti: cpuopti.o
	$(CC) $(LDFLAGS) -o cpuopti cpuopti.o

gencpu: gencpu.o readcpu.o cpudefs.o missing.o
	$(CC) $(LDFLAGS) -o gencpu gencpu.o readcpu.o missing.o cpudefs.o

cpuemu.c cputbl.h cpustbl.c: gencpu
	./gencpu

cpustbl.o: cpustbl.c
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) -o $@@ $<

cpuemu.o: cpuemu.c
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $<

#cpuemu.o: cpustbl.c
#	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $<

custom.o:

cpudefs.c: build68k ./table68k
	./build68k <./table68k >cpudefs.c

#cpufast.s: cpuemu.c cpuopti
#	$(CC) $(INCLUDES) -S $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $(NO_SCHED_CFLAGS) $< -o cputmp.s
#	./cpuopti <cputmp.s >$@@
#	rm cputmp.s

.rc.res:
	$(WRC) $(INCLUDES) $<
.m.o:
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $<
.c.o:
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $< -o $@@
.c.s:
	$(CC) $(INCLUDES) -S $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $< -o $@@
.c.i:
	$(CC) $(INCLUDES) -E $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $< > $@@
.S.o:
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $< -o $@@
.s.o:
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $< -o $@@

# Saves recompiling...
touch:
	touch *.o; touch build68k; touch cpudefs.c; touch cpudefs.o; touch gencpu; touch cpuemu.c; touch cpuopti.o cpuopti cpuemu.o cpufast.s cpufast.o

build68k.o: include/readcpu.h
readcpu.o: include/readcpu.h

main.o: config.h
cia.o: config.h include/events.h
custom.o: config.h include/events.h
newcpu.o: newcpu.c config.h include/events.h
	$(CC) $(INCLUDES) -c $(INCDIRS) $(CTFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) newcpu.c

sd-sound.o:	config.h sd-sound-oss.c sd-sound-file.c sd-sound-solaris.c sd-sound.h
audio.o: config.h include/events.h sd-sound.h
memory.o: config.h
debug.o: config.h
fpp.o: config.h

uade.o: config.h decrunch/decrunch.h sd-sound.h

amifilemagic.o: ../plugindir/amifilemagic.c ../plugindir/amifilemagic.h
	gcc -Wall -I. -c ../plugindir/amifilemagic.c

uade-os-unix.o:	uade-os-unix.c ../osdep/uade-os-unix.c ../osdep/uade-os-unix.h ../osdep/uadeconfig.h

@


1.6
log
@*** empty log message ***
@
text
@@


1.5
log
@*** empty log message ***
@
text
@d102 1
a102 1
uade.o: config.h decrunch/decrunch.h sd-sound.h ../osdep/uadeconfig.h
d107 1
a107 1
uade-os-unix.o:	uade-os-unix.c ../osdep/uade-os-unix.c ../osdep/uade-os-unix.h
@


1.4
log
@*** empty log message ***
@
text
@d102 1
a102 1
uade.o: config.h decrunch/decrunch.h sd-sound.h uadeconfig.h
@


1.3
log
@*** empty log message ***
@
text
@d16 1
a16 1
INCLUDES=-I. -I./include/
d22 1
a22 1
       cfgfile.o fpp.o debug.o uade.o amifilemagic.o
d106 3
@


1.2
log
@*** empty log message ***
@
text
@d22 1
a22 1
       cfgfile.o fpp.o debug.o uade.o
d104 2
@


1.1
log
@Initial revision
@
text
@d102 1
a102 1
uade.o: config.h decrunch/decrunch.h sd-sound.h
@


1.1.1.1
log
@wheeeee...
@
text
@@
