# +----------------------------------------------------------------------+ # | Aubit 4gl Language Compiler Version $.0 lib/libgui makefile | # +----------------------------------------------------------------------+ # | Copyright (c) 2000-1 Aubit Development Team (See Credits file) | # +----------------------------------------------------------------------+ # | This program is free software; you can redistribute it and/or modify | # | it under the terms of one of the following licenses: | # | | # | A) the GNU General Public License as published by the Free Software | # | Foundation; either version 2 of the License, or (at your option) | # | any later version. | # | | # | B) the Aubit License as published by the Aubit Development Team and | # | included in the distribution in the file: LICENSE | # | | # | This program is distributed in the hope that it will be useful, | # | but WITHOUT ANY WARRANTY; without even the implied warranty of | # | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # | GNU General Public License for more details. | # | | # | You should have received a copy of both licenses referred to here. | # | If you did not, or have any questions about Aubit licensing, please | # | contact afalout@ihug.co.nz | # +----------------------------------------------------------------------+ # # $Id: Makefile.in,v 1.83 2011/02/15 09:52:20 mikeaubury Exp $ # ROOT =../.. #All stuff common to more then one Aubit compiler make file is there: include ${ROOT}/incl/Makefile-common ## ================================================================== ## Options ## ================================================================== 4GLPC =${FGLPCEXEC} C_LOCAL_IFLAGS =-I${ROOT}/lib/libincl -I. CFLAGS +=${C_LOCAL_IFLAGS} @CURSES_INC_PATH@ @RPCLIB_INCLUDE@ LCLINT_CFLAGS =${C_IFLAGS} ${C_LOCAL_IFLAGS} EXE_CFLAGS +=-I${ROOT}/lib/libincl -I. ${C_IFLAGS} ALL =${ROOT}/bin/fcompile ${ROOT}/bin/fdecompile ${ROOT}/bin/fshow ${ROOT}/bin/default_frm ${ROOT}/bin/formgen_4gl ${ROOT}/bin/fdecompile_scr ifeq "$(OUTPUTLANG)" "java" ALL +=${ROOT}/bin/fdecompile-j endif #we don't want -Wall in CFLAGS when compiling form_x_xdr.c because it would #give us bunch of warnings about unused varibles, that we cannot fix #because this file is generated by rpcgen: #CFLAGS_FORM_X_XDR_C =$(CFLAGS:%-Wall=%) ## ================================================================== ## Source files ## ================================================================== #This files now make -lFORM_XDR #../compilers/fcompile/form_x_xdr.c readforms.c formwrite2.c #FIXME: add source files that use xdr_ Sun libRPC functions (decompile.c) #to -lFORM_XDR SOURCES.c =fcompile.c where.c SOURCES.yacc =screen.yacc SOURCES.lex =screen.lex TARGETS.c =y.tab.c DUMP_C =dump.c OBJS_DUMP_C =$(DUMP_C:%.c=%.o) OBJS_DUMP_SCR =dump_scr.o #FIXME: dump_java.c was never commited into CVS DUMP_JAVA =dump_java.c OBJS_DUMP_JAVA =$(DUMP_JAVA:%.c=%.o) DECOMPILE =decompile.c OBJS_DECOMPILE =$(DECOMPILE:%.c=%.o) CMODS =$(SOURCES.c) $(TARGETS.c) OBJECTS =$(CMODS:%.c=%.o) ifeq "${LEX}" "no" LEX_YY_C =${ROOT}/tools/no_yacc/cygwin/compilers/fcompile/lex.yy.c else LEX_YY_C =lex.yy.c endif ifeq "${YACC}" "no" Y_TAB_C_DEP =${ROOT}/tools/no_yacc/cygwin/compilers/fcompile/y.tab.c STATESFILES =${ROOT}/tools/no_yacc/cygwin/compilers/fcompile/mk_fstates.c ${ROOT}/tools/no_yacc/cygwin/compilers/fcompile/mk_fstates_1.h STATESDEP= else Y_TAB_C_DEP =$(SOURCES.yacc) ${LEX_YY_C} STATESDEP= mkstates y.output endif ## ================================================================== ## Targets ## ================================================================== all: $(ALL) @echo "Default targets (${ALL}) successfully compiled." ${ROOT}/bin/default_frm: create_default.o ${LD_EXE} -L${ROOT}/lib -o $@ $^ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} ${ROOT}/bin/fcompile: $(OBJECTS) ${LD_EXE} -L${ROOT}/lib -o $@ $^ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} #> ifneq "${TARGET_OS}" "hpux" #> ${LD_EXE} -L${ROOT}/lib -o $@ $^ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} #> else #> ${LD_EXE} -L${ROOT}/lib -o $@ $^ ${AUBIT_LIB} -lLEX_EC -lSQL_esql #> endif ${ROOT}/bin/fdecompile-j : ${OBJS_DECOMPILE} ${OBJS_DUMP_JAVA} ${LD_EXE} -L${ROOT}/lib $^ -o $@ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} ${ROOT}/bin/fdecompile : ${OBJS_DECOMPILE} ${OBJS_DUMP_C} ${LD_EXE} -L${ROOT}/lib $^ -o $@ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} ${ROOT}/bin/fdecompile_scr : ${OBJS_DECOMPILE} ${OBJS_DUMP_SCR} ${LD_EXE} -L${ROOT}/lib $^ -o $@ ${AUBIT_LIB} ${EXTRASYSTEMLIBS} #fshow : clean.fshow ${ROOT}/bin/fshow ${ROOT}/bin/fshow : fshow.o ${PLUGINDIR}/libUI_CONSOLE${SO_EXT} ${PLUGINDIR}/libLEX_C${SO_EXT} ${LD_EXE} -L${ROOT}/lib -o $@ $< ${AUBIT_LIB} ${EXTRASYSTEMLIBS} fshow.c : fshow.4gl A4GL_LEXTYPE=C; A4GL_RDYNAMIC=${RDYNAMIC}; A4GL_SQLTYPE=nosql; A4GL_UI=CONSOLE; ${ROOT}/bin/4glc fshow.4gl fshow.gdb: @echo "set args -ofshow fshow.4gl" (export A4GL_LEXTYPE=C; export DEBUG=ALL; export A4GL_SQLTYPE=nosql; export A4GL_UI=CONSOLE; gdb ${ROOT}/bin/4glc ) ## ================================================================== ## Sub targets ## ================================================================== y.tab.c: ${Y_TAB_C_DEP} ifeq "${YACC}" "no" ${CP} ${Y_TAB_C_DEP} . ${CP} ${STATESFILES} . else ${YACC} -y -r all -d -v $(SOURCES.yacc) endif lex.yy.c: $(SOURCES.lex) ifeq "${LEX}" "no" ${CP} ${LEX_YY_C} . else ${LEX} $(SOURCES.lex) endif #libexportlibformcomp.dll.a: ${4GLCAOBJ} ${4GLCOBJ_C} # ${CC} -shared -Wl,--output-def=libexportlibformcomp.def -Wl,--out-implib=libexportlibformcomp.dll.a $^ -Wl,--export-all-symbols ${AUBIT_LIB} -L${ROOT}/lib ## ================================================================== ## Dependencies ## ================================================================== y.tab.o: lex.yy.c mk_fstates.c formwrite2.o : ../../common/dataio/form_x.h fcompile.o : ../../common/dataio/form_x.h where.o : ../../common/dataio/form_x.h y.tab.o : screen.yacc dump_form.o: dump_form.c common.h global.h common_single.h global_single.h ${CC} ${CFLAGS} -c dump_form.c ${ROOT}/bin/formgen_4gl : dump_form.o decompile_4gl.o ${CC} ${CFLAGS} -g -I$(AUBITDIR)/incl -L$(AUBITDIR)/lib $^ -o $@ -laubit4gl ${ROOT}/bin/make_binfiles: make_binfiles.c ${CC} ${CFLAGS} -o ${ROOT}/bin/make_binfiles make_binfiles.c common.h: common.4gl ${ROOT}/bin/make_binfiles ${ROOT}/bin/make_binfiles common.4gl file_common > common.h global.h: global.4gl ${ROOT}/bin/make_binfiles ${ROOT}/bin/make_binfiles global.4gl file_global > global.h ## ================================================================== ## Clean Targets ## ================================================================== clean: clean.fshow $(RM) fcompile $(OBJECTS) $(TARGETS.c) *.BAK *.delta \ core *~ *.ln *.output *.bak *.exe lex.yy.c form_x.h form_x_xdr.c mk_fstates_1.h mk_fstates.c \ *.err fdecompile-j fdecompile *.out \ *.o *.glb clean.fshow: ${RM} fshow.c fshow.h fshow.glb fshow${EXE} ${ROOT}/bin/fshow${EXE} \ *.ao ## ================================================================== ## Other Targets ## ================================================================== splint: lclint lclint: $(CMODS) ${LCLINTERR}${LCLINTEXE} ${LCLINTFLAGS} $(LCLINT_CFLAGS) $(CMODS) > ${LCLINTLOG} ${LCLINTLOGCMD} ${CAT} ${LCLINTLOG} >> ${ROOT}/${LCLINT_GLOBAL_LOG} @echo "see ${LCLINTLOG} for results" mk_fstates.c: $(STATESDEP) ${SH} mkstates $(AWK) y.output: y.tab.c common_single.h: common_single.4gl ${ROOT}/bin/make_binfiles ${ROOT}/bin/make_binfiles common_single.4gl file_common_single > common_single.h global_single.h: global_single.4gl ${ROOT}/bin/make_binfiles ${ROOT}/bin/make_binfiles global_single.4gl file_global_single > global_single.h #-----------------------------------------------------------------------