# 
# MakeFile
#

# Linux Environment
IFLAGS        = -I/usr/X11/include -I../
LDFLAGS       = -L/usr/X11R6/lib -lforms -lX11 -lm

# Solaris environment

#X11_INC       = -I/usr/openwin
#XFORMS_INC    = -I/usr/local/include
#IFLAGS        = $(X11_INC) $(XFORMS_INC)

#X11_LIBPATH   = -L/usr/openwin/lib -R/usr/openwin/lib
#FORMS_LIBPATH = -L/usr/local/lib -R/usr/local/lib
#LDFLAGS       = $(FORMS_LIBPATH) $(X11_LIBPATH) $(FORMS_LIBPATH) \
#                 -lforms -lX11 -lm -lsocket -lnsl

# compiler and compiler flags
CC		= g++
CFLAGS		= -O2 -Wall
#CFLAGS          = -O2 -g -Wall

# the object files for teleroute
OBJ		= main.o \
              	  gui.o \
		  standart.o
# \
#		  gui.o \
#		  standart.o \
#		  fileio.o \
#		  parser.o \
#		  pref_gui.o \
#		  printer.o

# the xwgui program
PRG		= xwged

# Linking Object Files
$(PRG): $(OBJ)
	@echo "Linking $@ ..."
	$(CC) -o $(PRG) $(OBJ) $(LDFLAGS)
 
# Compile Source Files 
%.o: %.C
	@echo "Compiling $< ..."
	$(CC) $(CFLAGS) $(IFLAGS) -c $< 

clean:
	rm -f *.o	
	rm -f *~

install:
	@echo "Test Installation for DEMO-Version..."
	cp -f xwged /usr/local/bin	
	
uninstall:
	rm -f /usr/local/bin/xwged
	
help:
	@echo "Make <Options>"
	@echo "=============="
	@echo "all       - compile sources"
	@echo "clean     - clean all object-files"
	@echo "install   - install package"
	@echo "uninstall - remove installation"
	@echo "buildpkg  - create the package"
	@echo "help      - for this messsage"
	
		
	
		
