osmol

A simple static Gopher server in OCaml
git clone git://git.luxferre.top/osmol.git
Log | Files | Refs | README | LICENSE

Makefile (507B)


      1 # static POSIX makefile template for OCaml
      2 # depends on musl-gcc (optionally also zig cc)
      3 # and opam install ocaml-option-static ocaml-option-flambda
      4 
      5 CC = musl-gcc
      6 # CC = zig cc -target x86_64-linux-musl
      7 CFLAGS = -Os -static -s -flto
      8 LDFLAGS = -s -static -flto
      9 OC = ocamlopt
     10 OCFLAGS = -O2 -compact -cc "$(CC)" -ccopt "$(CFLAGS)" -cclib "$(LDFLAGS)"
     11 
     12 TARGET = osmol
     13 DEPS = -I +unix unix.cmxa
     14 
     15 $(TARGET): $(TARGET).ml
     16 	$(OC) $(DEPS) $(OCFLAGS) -o $(TARGET) $(TARGET).ml
     17 
     18 clean:
     19 	rm $(TARGET) *.cmi *.cmx *.o