#
# GRX makefile for LINUX/X11 version (GNU-make)
#
.PHONY : libs test bgitest clean cleanall install uninstall \
	 install-bin uninstall-bin install-fonts uninstall-fonts \
	 install-info uninstall-info

GRXVX11=y

include makedefs.grx

all: libs test bgitest

libs:
	$(MAKE) -C src -f makefile.x11

test: libs
	$(MAKE) -C test   -f makefile.x11
ifeq ($(INCLUDE_GPC_SUPPORT),y)
	$(MAKE) -C pascal -f makefile.x11
endif

bgitest: libs
ifeq ($(INCLUDE_BGI_SUPPORT),y)
	$(MAKE) -C test/bgi   -f makefile.x11
ifeq ($(INCLUDE_GPC_SUPPORT),y)
	$(MAKE) -C pascal/bgi -f makefile.x11
endif
endif

clean:
	$(MAKE) -C test       -f makefile.x11 clean
ifeq ($(INCLUDE_BGI_SUPPORT),y)
	$(MAKE) -C test/bgi   -f makefile.x11 clean
endif
	$(MAKE) -C src        -f makefile.x11 clean
ifeq ($(INCLUDE_GPC_SUPPORT),y)
	$(MAKE) -C pascal     -f makefile.x11 clean
ifeq ($(INCLUDE_BGI_SUPPORT),y)
	$(MAKE) -C pascal/bgi -f makefile.x11 clean
endif
endif

cleanall: clean
	$(MAKE) -C src -f makefile.x11 cleanall

install:
	$(MAKE) -C src -f makefile.x11 install

uninstall:
	$(MAKE) -C src -f makefile.x11 uninstall

install-info:
	$(MAKE) -C src -f makefile.x11 install-info

uninstall-info:
	$(MAKE) -C src -f makefile.x11 uninstall-info

install-bin:
	$(MAKE) -C src -f makefile.x11 install-bin

uninstall-bin:
	$(MAKE) -C src -f makefile.x11 uninstall-bin

install-fonts:
	$(MAKE) -C src -f makefile.x11 install-fonts

uninstall-fonts:
	$(MAKE) -C src -f makefile.x11 uninstall-fonts
