/*
 * mips RISC/os should add "-systype bsd43" to CDEBUGFLAGS.
 *
 * dec 5000 series systems should add -Ddec to CDEBUGFLAGS.  Once
 * again, I don't know the symbol, so I can't do it right here.
 *
 * HP/UX systems should add -Dhpux to CDEBUGFLAGS.
 *
 * System V systems needs -DSYSV, but I think that's done
 * automatically by the Imake configuration files for System V-like
 * systems, so you probably shouldn't have to worry about it.
 */

#include "../ACM.tmpl"

#if HasVoidSignalReturn == YES
DEFINES=	-DSIGVOID
#endif

SRCS1= 		server.c pm.c gear.c flaps.c droneCalc.c init.c aim9m.c\
		box.c \
		m61a1.c weapon.c newPlayer.c newPlane.c inventory.c missile.c\
		missileCalc.c update.c doEvents.c getStick.c\
		damage.c panel.c doViews.c hud.c hsi.c navaid.c windows.c\
		doRadar.c placeCraft.c transpose.c doScale.c \
		interpolate.c resupply.c air.c effects.c \
		imath.c alarm.c
OBJS1=		server.o pm.o gear.o flaps.o droneCalc.o init.o aim9m.o\
		box.o \
		m61a1.o weapon.o newPlayer.o newPlane.o inventory.o missile.o\
		missileCalc.o update.o doEvents.o getStick.o\
		damage.o panel.o doViews.o hud.o hsi.o navaid.o windows.o\
		doRadar.o placeCraft.o transpose.o doScale.o \
		interpolate.o resupply.o air.o effects.o \
		imath.o alarm.o
DEPLIBS1=	../V/lib/libV.a

SRCS2=		acm.c
OBJS2=		acm.o
DEPLIBS2=

PROGRAMS=	acm acms
BINDIR=		ACMBinaryDirectory

ACM_OBJECT_LIBRARY = Concat(ACMObjectDirectory,/)

DEFINES =	-DACM_LIBRARY=\"$(ACM_OBJECT_LIBRARY)\"

STD_INCLUDES=	-I../V/lib -I.
LOCAL_LIBRARIES=	../V/lib/libV.a
SYS_LIBRARIES=	-lm $(XLIB)

OBJS= $(OBJS1) $(OBJS2)
SRCS= $(SRCS1) $(SRCS2)

AllTarget($(PROGRAMS))

NormalProgramTarget(acms,$(OBJS1),$(DEPLIBS1),$(LOCAL_LIBRARIES),)
SaberProgramTarget(acms,$(SRCS1),$(OBJS1),$(LOCAL_LIBRARIES),)

InstallProgram(acms, $(BINDIR))

NormalProgramTarget(acm,$(OBJS2),$(DEPLIBS2),$(LOCAL_LIBRARIES),)
SaberProgramTarget(acm,$(SRCS2),$(OBJS2),$(LOCAL_LIBRARIES),)

InstallProgram(acm, $(BINDIR))
InstallManPage(acm,$(MANDIR))

DependTarget()
LintTarget()

install:: install.man

bitmap.h:
	grep -h '^#define' *.xbm > bitmap.h

panel.o:   bitmap.h
doViews.o: bitmap.h
