# GNU Makefile for the X11 part of the PTC 2.0 C++ API
# Copyright (c) 1998 Christian Nentwich (brn@eleet.mcb.at)
# The PTC 2.0 C++ API is (c) 1998 Glenn Fiedler (ptc@gaffer.org)
# This package is licensed under the GNU LGPL
#
# Please refer to the file COPYING.LIB contained in the distribution for
# licensing conditions 

include ../../Makefile.config

PROG1 = Window
PROG2 = Gtk
# gtk not yet finished

ifeq ($(LIBRARY),debug)
	FULLPROG1 = debug/$(PROG1)
	FULLPROG2 = debug/$(PROG2)
else
	FULLPROG1 = release/$(PROG1)
	FULLPROG2 = release/$(PROG2)
endif

all:	$(FULLPROG1) 

$(FULLPROG1): $(PROG1).o
	$(CC) $(PROG1).o $(PTCLIB) $(PTC_X_LIBRARIES) -o $(FULLPROG1)

$(FULLPROG2): $(PROG2).o
	$(CC) $(PROG2).o $(PTCLIB) $(PTC_X_LIBRARIES) -o $(FULLPROG2) `gtk-config --libs`

$(PROG2).o: $(PROG2).cpp
	$(CC) -c $(CFLAGS) `gtk-config --cflags` $<

%.o:	%.cpp
	$(CC) -c $(CFLAGS) $<

clean:
	rm -f *.o

distclean:
	rm -f *.o
	rm -f debug/$(PROG1) debug/$(PROG2)
	rm -f release/$(PROG1) release/$(PROG2)

