# SCOL - Linux-x11, Linux-nox, Solaris-nox toplevel makefile
#
# This one is different from the generic Makefile.model spread all over
# the subdirs : it is responsible for final linking of the kernel and
# platform specific object archives.

# !!! GNU Make needed !!!

CC      = gcc
ARCHIVE = .lib

default:
	@sh .$(dirname $0)/shazam

usm-x11:
	@$(MAKE) -C kernel
	@$(MAKE) -C x11
	$(CC) kernel/$(ARCHIVE) x11/$(ARCHIVE) -o $@ $(LFLAGS)
usm-nox:
	@$(MAKE) -C kernel
	@$(MAKE) -C linux-nox
	$(CC) $(LFLAGS) -ldl kernel/$(ARCHIVE) linux-nox/$(ARCHIVE) -o $@ -lm

clean-x11:
	@$(MAKE) -C kernel clean
	@$(MAKE) -C x11 clean
	rm -f usm-x11

clean-nox:
	@$(MAKE) -C kernel clean
	@$(MAKE) -C linux-nox clean
	rm -f usm-nox

clean:
	@$(MAKE) -C kernel clean
	@$(MAKE) -C x11 clean
	@$(MAKE) -C linux-nox clean
	rm -f usm-x11
	rm -f usm-nox