Poprawilem wiekszosc makow pod katem poprawego kompilowania.

Wystepuje blad kompilacji dla gue.



git-svn-id: svn://atos.wmid.amu.edu.pl/utt@9 e293616e-ec6a-49c2-aa92-f4a8b91c5d16
This commit is contained in:
pawelk 2008-03-13 11:45:16 +00:00
parent e1b08a23fa
commit 8d3e6ab33b
19 changed files with 141 additions and 143 deletions

View File

@ -1,33 +1,38 @@
# main makefile
BIN=bin
SRC=src
DIR=$(shell pwd)
# ******************************
# * Local variables
# ******************************
CUR_DIR=$(shell pwd)
SRC_DIR=$(CUR_DIR)/src
OUTPUT_DIR=$(CUR_DIR)/output
##############################
# ******************************
# * Global for make globals
# ******************************
UTT_DIST_NAME=utt-0.9
export UTT_DIR=${DIR}/${UTT_DIST_NAME}
export UTT_DIR=${OUTPUT_DIR}
export UTT_BIN_DIR=${UTT_DIR}/bin # executables
export UTT_CONF_DIR=${UTT_DIR}/conf # configuration files
export UTT_SHARE_DIR=${UTT_DIR}/share # stuff
export UTT_LANG_DIR=${UTT_DIR}/lang # language/encoding specific stuff
export UTT_TAGS_DIR=${UTT_DIR}/tags # tag format specific stuff
#export UTT_LIB_DIR=${UTT_DIR}/lib # nothing
export UTT_DOC_DIR=${UTT_DIR}/doc # documantation
UTT_DIST_FILE=utt
# list of components to be included in the distribution
COMPONENTS = lib gue tok.l cor lem kot sen-l sen-nl ser grp kon fla unfla mar compiledic
export UTT_CONF_DIR=${UTT_DIR}/etc/utt # configuration files
export UTT_LANG_DIR=${UTT_DIR}/share/utt # language/encoding specific stuff
export UTT_LIB_DIR=${UTT_DIR}/lib/utt # some files like ser.l.template, terms.m4
export UTT_SHARE_DIR=${UTT_DIR}/share # stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README
##############################
all: dirs components conf doc lang tags files share
@echo "Make completed successfully!"
# list of components to be included in the distribution
COMPONENTS = compiledic cor fla gph grp kon kot lem mar rm12 rs12 sen-l sen-nl ser tags tok.l unfla
# gue nie dziala!
##############################
# ------------------------------------------------------------------
# sekcja kompilacji (kompiluje i wgrywa do OUTPUT_DIR)
# ------------------------------------------------------------------
.PHONY: compile
compile: dirs components
@echo "Make compiled successfully!"
.PHONY: dirs
dirs:
@ -35,118 +40,88 @@ dirs:
mkdir -p ${UTT_DIR}
mkdir -p ${UTT_BIN_DIR}
mkdir -p ${UTT_CONF_DIR}
mkdir -p ${UTT_SHARE_DIR}
mkdir -p ${UTT_LANG_DIR}
mkdir -p ${UTT_TAGS_DIR}
mkdir -p ${UTT_DOC_DIR}
mkdir -p ${UTT_LIB_DIR}
mkdir -p ${UTT_SHARE_DIR}
.PHONY: components
components:
@for cmp in $(COMPONENTS); do\
make $$cmp;\
cd $(SRC_DIR)/$$cmp && make && make copy; cd $(CUR_DIR); \
done
${COMPONENTS}:
cd $(SRC)/$@ && make && make copy; cd $(DIR);
.PHONY: conf
conf:
cd $(DIR)/conf && make && make copy ; cd $(DIR)
.PHONY: doc
doc:
cd $(DIR)/doc && make && make copy ; cd $(DIR)
.PHONY: lang
lang:
cd $(DIR)/lang && make && make copy ; cd $(DIR)
.PHONY: tags
tags:
cd $(DIR)/tags && make && make copy ; cd $(DIR)
.PHONY: share
share:
cd $(DIR)/share && make && make copy ; cd $(DIR)
.PHONY: files
files:
cd ${DIR}/files && make && make copy ; cd ${DIR}
# ------------------------------------------------------------------
# sekcja sprzatania (kasuje binaria z katalogow SRC/COMPONENTS)
# ------------------------------------------------------------------
.PHONY: clean
clean: clean_components clean_doc clean_dist
@echo "All files cleaned successfully!"
.PHONY: clean_components
clean_components:
@for cmp in $(COMPONENTS); do \
cd $(SRC)/$$cmp && make clean ; cd $(DIR); \
cd $(SRC_DIR)/$$cmp && make clean ; cd $(CUR_DIR); \
done
cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR);
clean_lib:
cd $(SRC)/lib && make clean
.PHONY: clean_doc
clean_doc:
cd $(DIR)/doc && make clean ; cd $(DIR)
install: all
cd ${UTT_DIR} && make install; cd ${DIR}
uninstall:
cd ${UTT_DIR} && make uninstall; cd ${DIR}
reinstall:
cd ${UTT_DIR} && make reinstall; cd ${DIR}
# ifdef INSTALL_BIN_DIR
# if [ -d ${INSTALL_BIN_DIR} ]; then true; else mkdir -p ${INSTALL_BIN_DIR}; fi
# cp -r ${UTT_BIN_DIR}/* ${INSTALL_BIN_DIR}/
# endif
# ifdef INSTALL_SHARE_DIR
# if [ -d ${INSTALL_SHARE_DIR} ]; then true; else mkdir -p ${INSTALL_SHARE_DIR}; fi
# cp -r ${UTT_SHARE_DIR}/* ${INSTALL_SHARE_DIR}/
# endif
# ifdef INSTALL_DOC_DIR
# if [ -d ${INSTALL_DOC_DIR} ]; then true; else mkdir -p ${INSTALL_DOC_DIR}; fi
# cp -r ${UTT_DOC_DIR}/* ${INSTALL_DOC_DIR}/
# endif
# ifdef INSTALL_LIB_DIR
# if [ -d ${INSTALL_LIB_DIR} ]; then true; else mkdir -p ${INSTALL_LIB_DIR}; fi
# cp -r ${UTT_LIB_DIR}/* ${INSTALL_LIB_DIR}
# endif
#
# install: make_dirs install_components install_cnf install_dta install_doc
# @echo "Installation completed successfully!"
# install_components:
# @for cmp in $(COMPONENTS); do \
# cd $(SRC)/$$cmp && make install ; cd $(DIR); \
# done
# install_cnf:
# cp conf/*.conf $(UTT_ETC_DIR)/
# install_dta:
# cp -r data/* $(UTT_SHARE_DIR)/
# install_doc:
# cp doc/utt.{ps,pdf,html,info} $(UTT_DOC_DIR)/
# make_dirs:
# if [ -d $(UTT_BIN_DIR) ]; then true; else mkdir -p $(UTT_BIN_DIR); fi
# if [ -d $(UTT_ETC_DIR) ]; then true; else mkdir -p $(UTT_ETC_DIR); fi
# if [ -d $(UTT_SHARE_DIR) ]; then true; else mkdir -p $(UTT_SHARE_DIR); fi
# if [ -d $(UTT_DOC_DIR) ]; then true; else mkdir -p $(UTT_DOC_DIR); fi
# if [ -d $(UTT_LIB_DIR) ]; then true; else mkdir -p $(UTT_LIB_DIR); fi
dist: all
tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR)
cd $(CUR_DIR)/doc && make clean ; cd $(CUR_DIR)
.PHONY: clean_dist
clean_dist:
if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi
if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi
if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi
# ------------------------------------------------------------------
# sekcja przygotowania paczki (programow wraz z dodatkowymi plikami)
# ------------------------------------------------------------------
.PHONY: build
build: compile build_conf build_lib build_share
@echo "All files builded successfully!"
.PHONY: build_conf
build_conf:
cp $(CUR_DIR)/conf/* $(UTT_CONF_DIR)/
.PHONY: build_lib
build_lib:
cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/
.PHONY: build_share
build_share:
@echo "We need to create documentation here!"
# ------------------------------------------------------------------
# sekcja tworzenia dystrybucji (tarballa, rpm, deb)
# ------------------------------------------------------------------
.PHONY: distribute
distribute:
@echo "We need to create distribution here!"
# ------------------------------------------------------------------
# sekcja testowania (kasuje tarballa z TARBALL_TEST_DIR,
# kompiluje, robi paczke,
# tworzy tarballa i wgrywa go do TARBALL_TEST_DIR)
# ------------------------------------------------------------------
#install: all
# cd ${UTT_DIR} && make install; cd ${CUR_DIR}
#uninstall:
# cd ${UTT_DIR} && make uninstall; cd ${DIR}
#reinstall:
# cd ${UTT_DIR} && make reinstall; cd ${DIR}
#dist: all
# tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR)
#clean_dist:
# if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi
# if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi
# if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi

View File

@ -1,12 +1,20 @@
CFLAG1 = -m32 -Wno-deprecated -O3 -fpermissive
CFLAG_ST = -Wno-deprecated -O3 -fpermissive -static
all: compiledic aut2fsa
compiledic:
aut2fsa: aut2fsa.cc
g++ -Wno-deprecated -O3 -fpermissive -static -o aut2fsa aut2fsa.cc
#g++ -m32 -Wno-deprecated -O3 -fpermissive -static -o aut2fsa aut2fsa.cc
g++ $(CFLAG1) -o aut2fsa aut2fsa.cc
copy:
ifdef UTT_BIN_DIR
cp compiledic fsm2aut aut2fsa ${UTT_BIN_DIR}
endif
clean:
rm aut2fsa

View File

@ -25,8 +25,8 @@ common_cor.o: cmdline.h common_cor.cc common_cor.h
cmdline.c cmdline.h: cmdline.ggo
gengetopt -i cmdline.ggo --conf-parser
cmdline.ggo: cmdline_cor.ggo ../common/cmdline_common.ggo
cat cmdline_cor.ggo ../common/cmdline_common.ggo > cmdline.ggo
cmdline.ggo: cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo
cat cmdline_cor.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo
copy:
ifdef UTT_BIN_DIR

View File

@ -1,6 +1,8 @@
PAR = -m32
# -static
fla: fla.c
gcc -static -o fla fla.c
gcc $(PAR) -o fla fla.c
copy:
ifdef UTT_BIN_DIR
@ -9,5 +11,3 @@ endif
clean:
rm fla
uninstall:

View File

@ -5,3 +5,5 @@ copy:
ifdef UTT_BIN_DIR
cp gph ${UTT_BIN_DIR}
endif
clean:

View File

@ -4,3 +4,5 @@ copy:
ifdef UTT_BIN_DIR
cp grp ${UTT_BIN_DIR}
endif
clean:

View File

@ -1,5 +1,6 @@
PAR=-Wno-deprecated -O3 -fpermissive -static
PAR2=-c -Wno-deprecated -O3 -fpermissive
PAR=-Wno-deprecated -O3 -fpermissive -m32
#-static
PAR2=-c -Wno-deprecated -O3 -fpermissive -m32
LIB_PATH=../lib
COMMON_PATH=../common
CMDLINE_FILE='"../gue/cmdline.h"'
@ -24,8 +25,8 @@ common.o: $(COMMON_PATH)/cmdline_common.ggo $(COMMON_PATH)/common.cc \
cmdline.c cmdline.h: cmdline.ggo
gengetopt -i cmdline.ggo --conf-parser
cmdline.ggo: cmdline_guess.ggo ../common/cmdline_common.ggo
cat cmdline_guess.ggo ../common/cmdline_common.ggo > cmdline.ggo
cmdline.ggo: cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo
cat cmdline_guess.ggo $(COMMON_PATH)/cmdline_common.ggo > cmdline.ggo
clean: clean.cmdline

View File

@ -4,8 +4,8 @@ version "0.1"
option "guess_count" n "Guess up to n descriptions" int default="0" no
option "delta" - "Stop displaying answers after fall of weight" float default="0.2" no
option "cut-off" - "Do not display answers with less weight than cut-off" int default="200" no
option "dictionary-home" - "dh" hidden
option "dictionary" d "File with dictionary information" string typestr="filename" default="~/.utt/lang/pl_PL.ISO-8859-2/gue.bin" no
option "dictionary-home" - "dh" string typestr="FILENAME" no hidden
option "dictionary" d "File with dictionary information" string typestr="filename" default="gue.bin" no
option "per-info" v "Display performance information" flag off
option "weights" w "Print weights" flag off hidden
option "no-uppercase" - "Do not process form containing uppercase letters" flag off

View File

@ -1,7 +1,9 @@
con:
kon:
copy:
ifdef UTT_BIN_DIR
cp kon ${UTT_BIN_DIR}
endif
clean:

View File

@ -5,3 +5,5 @@ copy:
ifdef UTT_BIN_DIR
cp kot ${UTT_BIN_DIR}
endif
clean:

View File

@ -1,5 +1,6 @@
PAR=-Wno-deprecated -m32 -O3
PAR2=-c -Wno-deprecated -m32 -O3 -static -fpermissive
PAR2=-c -Wno-deprecated -m32 -O3 -fpermissive
# -static
LIB_PATH=../lib
COMMON_PATH=../common
@ -15,6 +16,6 @@ clean:
rm *.o
copy:
ifdef UTT_LIB_DIR
cp -r perl $(UTT_LIB_DIR)/
endif
#ifdef UTT_LIB_DIR
# cp -r perl $(UTT_LIB_DIR)/
#endif

View File

@ -4,3 +4,5 @@ copy:
ifdef UTT_BIN_DIR
cp mar ${UTT_BIN_DIR}
endif
clean:

View File

@ -4,3 +4,5 @@ copy:
ifdef UTT_BIN_DIR
cp rm12 ${UTT_BIN_DIR}
endif
clean:

View File

@ -1,7 +1,10 @@
PAR = -m32
# -static
main: rs12
rs12: rs12.c
gcc -static -o rs12 rs12.c
gcc $(PAR) -o rs12 rs12.c
clean:
rm rs12

View File

@ -1,5 +1,4 @@
sen: sen.l
flex -osen.c sen.l
cc -O3 -o sen sen.c -lfl
@ -11,5 +10,3 @@ endif
clean:
rm sen.c sen
uninstall:

View File

@ -7,5 +7,3 @@ ifdef UTT_BIN_DIR
endif
clean:
uninstall:

View File

@ -1,8 +1,8 @@
main:
copy:
ifdef UTT_TAGS_DIR
cp *.tag2re ${UTT_TAGS_DIR}
ifdef UTT_BIN_DIR
cp *.tag2re ${UTT_BIN_DIR}
endif
clean:

View File

@ -1,4 +1,5 @@
PAR=-O3 -static
PAR=-O3 -m32
#-static
tok: tok.c cmdline.c
cc $(PAR) tok.c cmdline.c -o tok

View File

@ -4,3 +4,5 @@ copy:
ifdef UTT_BIN_DIR
cp unfla ${UTT_BIN_DIR}
endif
clean: