1. ccorrodi
  2. ocaml-make

Commits

ccorrodi  committed 5e66c05

fix bug in makefile with linking libs

  • Participants
  • Parent commits 7ccd777
  • Branches develop

Comments (0)

Files changed (1)

File Makefile

View file
 SRCDIRS = src,test
 DEBUG = 1
 FLAGS = -build-dir $(OBJDIR) -Is $(SRCDIRS)
-LIBS = str
-BUILD = $(OCAMLBUILD) $(FLAGS)
-ifdef LIBS
-  BUILD += -libs $(LIBS)
+ifdef DEBUG
+  FLAGS += -cflags -annot
 endif
+LIBBUILD = $(OCAMLBUILD) $(FLAGS)
+BUILD = $(OCAMLBUILD) $(FLAGS)
 TESTFLAGS = -lflags -I,/usr/lib/ocaml/oUnit -cflags -I,/usr/lib/ocaml/oUnit -libs unix,oUnit
 
-ifdef DEBUG
-  FLAGS += -cflags -annot
+LIBS = str
+ifdef LIBS
+  BUILD += -libs $(LIBS)
 endif
 
 default: lib-native
 
 lib-byte:
-	$(BUILD) $(LIBFLAGS) src/ocamlmake.cma
+	$(LIBBUILD) $(LIBFLAGS) src/ocamlmake.cma
 	cp -f $(OBJDIR)/src/ocamlmake.cma $(BINDIR)/ocamlmake.cma
 
 lib-native:
-	$(BUILD) $(LIBFLAGS) src/ocamlmake.cmxa
+	$(LIBBUILD) $(LIBFLAGS) src/ocamlmake.cmxa
 	cp -f $(OBJDIR)/src/ocamlmake.cmxa $(BINDIR)/ocamlmake.cmxa
 
 main-byte: