2016-02-18 07:11:59 -08:00
|
|
|
#**************************************************************************
|
|
|
|
#* *
|
|
|
|
#* OCaml *
|
|
|
|
#* *
|
|
|
|
#* Xavier Leroy, projet Cristal, INRIA Rocquencourt *
|
|
|
|
#* *
|
|
|
|
#* Copyright 1999 Institut National de Recherche en Informatique et *
|
|
|
|
#* en Automatique. *
|
|
|
|
#* *
|
|
|
|
#* All rights reserved. This file is distributed under the terms of *
|
|
|
|
#* the GNU Lesser General Public License version 2.1, with the *
|
|
|
|
#* special exception on linking described in the file LICENSE. *
|
|
|
|
#* *
|
|
|
|
#**************************************************************************
|
1999-11-17 10:59:06 -08:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
# Makefile for the parser generator.
|
|
|
|
|
2018-09-17 05:51:01 -07:00
|
|
|
ROOTDIR = ..
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2020-04-17 05:53:49 -07:00
|
|
|
include $(ROOTDIR)/Makefile.common
|
2018-09-17 05:51:01 -07:00
|
|
|
|
|
|
|
OC_CPPFLAGS += -I$(ROOTDIR)/runtime
|
|
|
|
|
2019-04-16 09:37:17 -07:00
|
|
|
ifeq "$(UNIX_OR_WIN32)" "win32"
|
|
|
|
WSTR_OBJ = wstr
|
|
|
|
else
|
|
|
|
WSTR_OBJ =
|
|
|
|
endif
|
|
|
|
|
2018-09-17 05:51:01 -07:00
|
|
|
ocamlyacc_SOURCES := $(addsuffix .c,\
|
2019-04-16 09:37:17 -07:00
|
|
|
$(WSTR_OBJ) closure error lalr lr0 main mkpar output reader skeleton \
|
|
|
|
symtab verbose warshall)
|
2018-09-17 05:51:01 -07:00
|
|
|
|
|
|
|
ocamlyacc_OBJECTS := $(ocamlyacc_SOURCES:.c=.$(O))
|
|
|
|
|
|
|
|
generated_files := ocamlyacc$(EXE) $(ocamlyacc_OBJECTS) version.h
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-08-10 02:58:08 -07:00
|
|
|
all: ocamlyacc$(EXE)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2018-09-17 05:51:01 -07:00
|
|
|
ocamlyacc$(EXE): $(ocamlyacc_OBJECTS)
|
2019-04-16 09:37:17 -07:00
|
|
|
$(MKEXE) -o $@ $^ $(EXTRALIBS)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2018-09-17 05:51:01 -07:00
|
|
|
version.h : $(ROOTDIR)/VERSION
|
|
|
|
echo "#define OCAML_VERSION \"`sed -e 1q $< | tr -d '\r'`\"" > $@
|
2004-11-26 17:04:19 -08:00
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
clean:
|
2019-10-15 03:46:36 -07:00
|
|
|
rm -f ocamlyacc ocamlyacc.exe wstr.o wstr.obj version.h \
|
|
|
|
$(ocamlyacc_SOURCES:.c=.o) $(ocamlyacc_SOURCES:.c=.obj)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
depend:
|
|
|
|
|
2016-03-12 21:23:27 -08:00
|
|
|
closure.$(O): defs.h
|
|
|
|
error.$(O): defs.h
|
|
|
|
lalr.$(O): defs.h
|
|
|
|
lr0.$(O): defs.h
|
|
|
|
main.$(O): defs.h version.h
|
|
|
|
mkpar.$(O): defs.h
|
|
|
|
output.$(O): defs.h
|
|
|
|
reader.$(O): defs.h
|
|
|
|
skeleton.$(O): defs.h
|
|
|
|
symtab.$(O): defs.h
|
|
|
|
verbose.$(O): defs.h
|
|
|
|
warshall.$(O): defs.h
|