2121
2222
2323# # Read configuration settings and standard definitions
24- TOP = $(shell pwd) /..
24+ TOP = $(R_PACKAGE_SOURCE )
2525include $(TOP ) /config.mk
2626
2727# # The following targets are available:
@@ -67,7 +67,7 @@ HDRS = globals.h cwb-globals.h ui-helpers.c \
6767 corpus.h attributes.h makecomps.h \
6868 $(PARSEH ) \
6969 bitio.h \
70- endian .h \
70+ endian2 .h \
7171 compression.h \
7272 $(MMAPH )
7373
@@ -103,49 +103,20 @@ EXTRA_OBJS = dl_stub.o
103103
104104all : libcl.a $(EXTRA_OBJS )
105105
106- registry.tab.c registry.tab.h : registry.y corpus.h attributes.h globals.h cl.h
107- @$(ECHO ) " .... compile registry parser from Bison grammar"
108- $(YACC ) -p creg -v registry.y
109- # NB: see comments in registry.y on use of "-p creg".
110-
111- lex.creg.c : registry.l registry.y registry.tab.h corpus.h attributes.h globals.h cl.h
112- @$(ECHO ) " .... compile registry lexer from Flex grammar"
113- $(LEX ) registry.l
114-
115106libcl.a : $(OBJS )
116- @$(ECHO ) " .... generate static library file for CL"
117107 $(RM ) $@
118- $(AR ) $@ $^
119- $(RANLIB ) $@
108+ $(AR ) cq $@ $^
120109
121110install : libcl.a
122111ifndef __MINGW__
123- @$(ECHO) " .... install the CL static library file"
124112 if [ ! -d "$(LIBINSTDIR)" ]; then $(INSTALL) $(INST_FLAGS_DIR) "$(LIBINSTDIR)" ; fi;
125113 $(INSTALL) $(INST_FLAGS_DATA) libcl.a "$(LIBINSTDIR)"
126- @$(ECHO) " .... install cwb/cl.h header file"
127114 if [ ! -d "$(REALINCINSTDIR)" ]; then $(INSTALL) $(INST_FLAGS_DIR) "$(REALINCINSTDIR)" ; fi;
128115 $(INSTALL) $(INST_FLAGS_DATA) cl.h "$(REALINCINSTDIR)"
129116else
130- @$(ECHO) "ERROR: install operation is not supported for Windows binaries!"
131117endif
132118
133- release : libcl.a
134- @$(ECHO ) " .... add to release: libcl static library file"
135- if [ ! -d " $( RELEASE_DIR) /lib" ]; then $( INSTALL) $( INST_FLAGS_DIR) " $( RELEASE_DIR) /lib" ; fi ;
136- $(INSTALL ) $(INST_FLAGS_DATA ) libcl.a " $( RELEASE_DIR) /lib"
137- @$(ECHO ) " .... add to release: cwb/cl.h header file"
138- if [ ! -d " $( RELEASE_DIR) /include/cwb" ]; then $( INSTALL) $( INST_FLAGS_DIR) " $( RELEASE_DIR) /include/cwb" ; fi ;
139- $(INSTALL ) $(INST_FLAGS_DATA ) cl.h " $( RELEASE_DIR) /include/cwb"
140-
141-
142- uninstall :
143- @$(ECHO ) " ERROR: uninstall operation is currently not supported!"
144- # $(RM) $(LIBINSTDIR)/libcl.a
145- # (cd $(REALINCINSTDIR); $(RM) cl.h)
146-
147119depend :
148- @$(ECHO ) " .... generate the CL's make dependencies"
149120 -$(RM ) depend.mk
150121 $(MAKE ) depend.mk
151122
@@ -155,16 +126,13 @@ depend.mk: $(PARSEH) $(PARSES) $(SRCS)
155126 $(DEPEND ) $(DEPEND_CFLAGS_ALL ) $(SRCS ) > depend.mk
156127
157128clean :
158- @$(ECHO ) " .... cleanup compiled CL library code"
159129 -$(RM ) * .o libcl.a registry.output * ~
160130
161131realclean : clean
162- @$(ECHO ) " .... cleanup CL registry parser's automatic files"
163132 -$(RM ) registry.tab.c registry.tab.c lex.creg.c registry.tab.h
164133 -$(RM ) depend.mk
165134
166135size : $(SRCS ) $(HDRS )
167- @$(ECHO ) " .... count up lines of code in CL"
168136# I am not sure if the following line will work to make these print even with .SILENT turned on ...
169137 @$(ECHO) `$(WC) $(SRCS) $(HDRS)`
170138 $(WC) $(SRCS) $(HDRS)
0 commit comments