# This Makefile was once derived from the Linux 1.2.11 main Makefile.
# Author: Christian Starkjohann
#
# This and the subdirectory Makefiles must be run by GNU-Make.

.EXPORT_ALL_VARIABLES:

NAME	=	rumba
TOPDIR	:=	$(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

MYINCL	=	$(TOPDIR)/my_include
INCL	=	$(TOPDIR)/include
THE_CC	=	gcc

##############################################################################
############################ System specific part ############################
##############################################################################

# For NEXTSTEP/OPENSTEP:
CFLAGS = -Wall -O2 -traditional-cpp -g
INCLUDES = -I$(MYINCL) -I$(INCL)
# put your architecture here:
ARCH = -arch i386
THE_CC = cc

# For Linux:
#CFLAGS = -Wall -O2 -g
#INCLUDES = -I$(INCL)

##############################################################################
######################## End of system specific part #########################
##############################################################################

LD		=	ld
CC		=	$(THE_CC) $(INCLUDES) -D__KERNEL__
STRIP	=	strip

OFILES = proc.o sock.o rumba.o psinode.o kernel.o smb_abstraction.o fo_nfs.o

.c.o:
	$(CC) $(CFLAGS) $(ARCH) -c -o $*.o $<

all: $(NAME)

nfs_dir:
	$(MAKE) -C nfs

$(NAME): $(OFILES) nfs_dir
	$(CC) $(ARCH) -o $(NAME) $(OFILES) nfs/nfs.o

clean:
	rm -f $(OFILES)
	rm -f $(NAME)
	$(MAKE) -C nfs clean
