/* Makefile for shXbridge */
/* Copyright 1990, Digital Equipment Corporation, CEC Karlsruhe */

#include "../shXlib/config.h"

#ifndef TCP
#define TCP
#endif

#ifndef UNIX_CONN
#define UNIX_CONN
#endif

#ifdef DNET
#define DNETLIB -ldnet
#else
#define DNETLIB
#define DNET
#endif

#ifndef DEBUG
#define DEBUG
#endif

CDEBUGFLAGS = 
INCLUDES = -I../shXlib
DEFINES = -DFIX_EVENT_MASK -Dnotdef TCP UNIX_CONN DNET DEBUG -DVERSION=\"1.0\"
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(DEFINES)
SHXLIB = ../shXlib/libshX11.a
LIB = $(SHXLIB)  -lc -ldbm DNETLIB

GOAL = shXbridge

SRCS = 	ps_build.c \
	ps_cleanup.c \
	ps_conn.c \
	ps_dispatch.c \
	ps_events.c \
	ps_globals.c \
	ps_init.c \
	ps_io.c \
	ps_main.c \
	ps_map.c \
	ps_osinit.c \
	ps_replies.c \
	ps_requests.c \
	ps_resources.c \
	ps_table.c \
	ps_utils.c \
	ps_wait.c

OBJS =  ps_cleanup.o \
	ps_globals.o \
	ps_io.o \
	ps_main.o \
	ps_map.o \
	ps_osinit.o \
	ps_resources.o \
	ps_table.o \
	ps_utils.o \
	ps_wait.o

ADDOBJS = \
	ps_requests.o \
	ps_replies.o \
	ps_events.o \
	ps_init.o \
	ps_build.o \
	ps_dispatch.o \
	ps_conn.o

all: $(OBJS) $(ADDOBJS) $(SHXLIB)
	$(CC) $(CFLAGS) -o $(GOAL) $(OBJS) $(ADDOBJS) $(LIB)

man:
	cp shXbridge.man MANDIR/shXbridge.1

tags:
	etags -t $(SRCS)

clean:
	rm -f \#* *.bak *.BAK *.o core *~ *.orig TAGS
