harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

Makefile (603B)


      1 .POSIX:
      2 .SUFFIXES:
      3 OUTDIR=.build
      4 include $(OUTDIR)/config.mk
      5 
      6 harec: $(harec_objects)
      7 	@printf 'CCLD\t$@\n'
      8 	@$(CC) $(LDFLAGS) -o $@ $(harec_objects) $(LIBS)
      9 
     10 include rt/Makefile
     11 include testmod/Makefile
     12 include tests/Makefile
     13 
     14 .SUFFIXES: .c .o .ha .s .scd .1 .5
     15 
     16 .c.o:
     17 	@printf 'CC\t$@\n'
     18 	@$(CC) -c $(CFLAGS) -o $@ $<
     19 
     20 .s.o:
     21 	@printf 'AS\t$@\n'
     22 	@$(AS) -o $@ $<
     23 
     24 clean: clean-tests clean-rt clean-testmod
     25 	@rm -f harec $(harec_objects)
     26 
     27 distclean: clean
     28 	@rm -rf "$(OUTDIR)"
     29 
     30 install: harec
     31 	mkdir -p $(DESTDIR)$(BINDIR)
     32 	install -m755 harec $(DESTDIR)$(BINDIR)/harec
     33 
     34 .PHONY: clean distclean install