
# A sample makefile for building executables from clu sources

# directory where pclu is installed
PCLUDIR = 	$(CLUHOME)

# directory with library files
LIBDIR = 	$(PCLUDIR)/code

# directory with include files
INCLUDEDIR = 	$(PCLUDIR)/include

# compiler
CLU = 		$(PCLUDIR)/code/cmp/pclu

#flags to c compiler
CFLAGS = -I$(INCLUDEDIR) -G 4 -O2 -w

OBJS = hello.o 

all: $(OBJS) hello.c
	cc -o hello hello.o -L$(LIBDIR) -lpclu -lgc -lm

hello.c: hello.clu
	$(CLU) \#me \~CLU/lib/lowlev \#co hello

$(OBJS): $(INCLUDEDIR)/pclu_err.h $(INCLUDEDIR)/pclu_sys.h

clean:
	rm -f $(OBJS) hello.c hello
