
# +----------------------+-------------------------------------------
# | Generic Instructions |
# +----------------------+

%.o: %.c
	raco ctool --cc $(RACO_GC) $(RACO_CFLAGS) $^ 

%.so: %.o
	raco ctool $(RACO_GC) --ld $@ $<

# +-----------+------------------------------------------------------
# | Variables |
# +-----------+

# Flags for the Racket C compiler.
RACO_CFLAGS = ++ccf -g ++ccf -Wall

# The directory in which compiled Racket extensions go
TARGET_DIR = compiled/native/i386-linux/3m

# The Racket Garbage Collector.  This should probably be --cgc, but I think
# some files need to be installed for cgc.
RACO_GC = --3m

# Default!
default: hello.so

# Install (still a work in progress)
install: hello.install

%.install: %.so
	install -D $(TARGET_DIR)/$< $<

