Commit fc81e86a authored by Josh Kunz's avatar Josh Kunz

Fixes major makefile clean error.

parent d0b0ee45
......@@ -2,51 +2,28 @@
OCAMLFLAGS = -I ../include/
bin = naga
par_prefix = Datalog
lex_prefix = $(par_prefix)Lex
yacc_prefix = $(par_prefix)Parse
libs = unix
interfaces = $(yacc_prefix).mli $(wildcard *.mli)
sources =
sources += $(yacc_prefix).ml $(lex_prefix).ml
sources +=
objects = $(patsubst,%.cmo,$(sources))
bin = nagad
sources =
interfaces = $(patsubst %.mli,%.cmi,$(filter %.mli,$(sources)))
interfaces += $(patsubst,%.cmi,$(filter,$(sources)))
objects = $(patsubst,%.cmo,$(filter,$(sources)))
libs = json http
depfile = Makefile.d
default: $(bin)
$(bin): $(objects)
ocamlc $(OCAMLFLAGS) -o $@ $(addsuffix .cma,$(libs)) $^
abs_libs = $(addprefix ../lib/,$(addsuffix .cma,$(libs)))
$(lex_prefix).ml: $(par_prefix).mll
ocamllex $(OCAMLLEX_FLAGS) -o $@ $<
$(yacc_prefix).ml $(yacc_prefix).mli: $(par_prefix).mly
ocamlyacc $(OCAMLYACC_FLAGS) -b$(yacc_prefix) $<
ocamlc $(OCAMLFLAGS) -c $<
ocamlopt $(OCAMLFLAGS) -c $<
default: $(bin)
%.cmi: %.mli
ocamlc $(OCAMLFLAGS) -c $<
$(depfile): $(sources)
$(depfile): $(sources) $(interfaces)
ocamldep $(OCAMLFLAGS) $^ > $@
$(bin): $(abs_libs) $(objects)
ocamlc $(OCAMLFLAGS) -o $@ $^
-rm -f $(bin) *.cmo *.cmi *.o *.cmx
-rm -f $(lex_prefix).ml $(wildcard $(yacc_prefix).ml*)
-rm -f $(depfile)
-rm -f $(bin) $(objects) $(interfaces) $(depfile)
include $(depfile)
include ../common/Makefile.implicit
-include $(depfile)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment