#lang racket-makefile ;; Load only: ;; racket -t Makefile.rkt ;; ;; Build the default target: ;; racket -t Makefile.rkt -e "(make)" ;; ;; Clean and rebuild: ;; racket -t Makefile.rkt -e "(make clean all)" ;; ;; In DrRacket, press Run and then enter (make), (make clean), etc. (define CC 'cc) (define CFLAGS '(-Wall -O2)) (default-target all) (phony all clean setup test) (target all (deps "hello")) (target "hello" (deps "hello.c") (run `(,CC ,@CFLAGS -o $target $<))) (target clean (rm-f "hello") (rm-rf "compiled") (cleanup "scrbl" '("**.html" "**.js" "**.css"))) (target setup (raco '(setup racket-makefile))) (target test (raco '(test -p racket-makefile)))