Blame Makefile

Packit bf408e
# Makefile for core analysis suite
Packit bf408e
#
Packit bf408e
# Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
Packit bf408e
#       www.missioncriticallinux.com, info@missioncriticallinux.com
Packit bf408e
#
Packit bf408e
# Copyright (C) 2002-2016 David Anderson
Packit bf408e
# Copyright (C) 2002-2016 Red Hat, Inc. All rights reserved.
Packit bf408e
#
Packit bf408e
# This program is free software; you can redistribute it and/or modify
Packit bf408e
# it under the terms of the GNU General Public License as published by
Packit bf408e
# the Free Software Foundation; either version 2 of the License, or
Packit bf408e
# (at your option) any later version.
Packit bf408e
#
Packit bf408e
# This program is distributed in the hope that it will be useful,
Packit bf408e
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit bf408e
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit bf408e
# GNU General Public License for more details.
Packit bf408e
#
Packit bf408e
Packit bf408e
PROGRAM=crash
Packit bf408e
Packit bf408e
#
Packit bf408e
# Supported targets: X86 ALPHA PPC IA64 PPC64 SPARC64
Packit bf408e
# TARGET and GDB_CONF_FLAGS will be configured automatically by configure
Packit bf408e
#
Packit bf408e
TARGET=
Packit bf408e
GDB_CONF_FLAGS=
Packit bf408e
Packit bf408e
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
Packit bf408e
ifeq (${ARCH}, ppc64)
Packit bf408e
CONF_FLAGS = -m64
Packit bf408e
endif
Packit bf408e
Packit bf408e
#
Packit bf408e
# GDB, GDB_FILES, GDB_OFILES and GDB_PATCH_FILES will be configured automatically by configure 
Packit bf408e
#
Packit bf408e
GDB=
Packit bf408e
GDB_FILES=
Packit bf408e
GDB_OFILES=
Packit bf408e
GDB_PATCH_FILES=
Packit bf408e
Packit bf408e
#
Packit bf408e
# Default installation directory
Packit bf408e
#
Packit bf408e
INSTALLDIR=${DESTDIR}/usr/bin
Packit bf408e
Packit bf408e
# LDFLAGS will be configured automatically by configure
Packit bf408e
LDFLAGS=
Packit bf408e
Packit bf408e
GENERIC_HFILES=defs.h xen_hyper_defs.h xen_dom0.h
Packit bf408e
MCORE_HFILES=va_server.h vas_crash.h
Packit bf408e
REDHAT_HFILES=netdump.h diskdump.h makedumpfile.h xendump.h kvmdump.h qemu-load.h vmcore.h
Packit bf408e
LKCD_DUMP_HFILES=lkcd_vmdump_v1.h lkcd_vmdump_v2_v3.h lkcd_dump_v5.h \
Packit bf408e
        lkcd_dump_v7.h lkcd_dump_v8.h
Packit bf408e
LKCD_OBSOLETE_HFILES=lkcd_fix_mem.h
Packit bf408e
LKCD_TRACE_HFILES=lkcd_x86_trace.h
Packit bf408e
IBM_HFILES=ibm_common.h
Packit bf408e
SADUMP_HFILES=sadump.h
Packit bf408e
UNWIND_HFILES=unwind.h unwind_i.h rse.h unwind_x86.h unwind_x86_64.h
Packit bf408e
VMWARE_HFILES=vmware_vmss.h
Packit bf408e
Packit bf408e
CFILES=main.c tools.c global_data.c memory.c filesys.c help.c task.c \
Packit bf408e
	kernel.c test.c gdb_interface.c configure.c net.c dev.c bpf.c \
Packit bf408e
	alpha.c x86.c ppc.c ia64.c s390.c s390x.c s390dbf.c ppc64.c x86_64.c \
Packit bf408e
	arm.c arm64.c mips.c sparc64.c \
Packit bf408e
	extensions.c remote.c va_server.c va_server_v1.c symbols.c cmdline.c \
Packit bf408e
	lkcd_common.c lkcd_v1.c lkcd_v2_v3.c lkcd_v5.c lkcd_v7.c lkcd_v8.c\
Packit bf408e
	lkcd_fix_mem.c s390_dump.c lkcd_x86_trace.c \
Packit bf408e
	netdump.c diskdump.c makedumpfile.c xendump.c unwind.c unwind_decoder.c \
Packit bf408e
	unwind_x86_32_64.c unwind_arm.c \
Packit bf408e
	xen_hyper.c xen_hyper_command.c xen_hyper_global_data.c \
Packit bf408e
	xen_hyper_dump_tables.c kvmdump.c qemu.c qemu-load.c sadump.c ipcs.c \
Packit bf408e
	ramdump.c vmware_vmss.c \
Packit bf408e
	xen_dom0.c kaslr_helper.c
Packit bf408e
Packit bf408e
SOURCE_FILES=${CFILES} ${GENERIC_HFILES} ${MCORE_HFILES} \
Packit bf408e
	${REDHAT_CFILES} ${REDHAT_HFILES} ${UNWIND_HFILES} \
Packit bf408e
	${LKCD_DUMP_HFILES} ${LKCD_TRACE_HFILES} ${LKCD_OBSOLETE_HFILES}\
Packit bf408e
	${IBM_HFILES} ${SADUMP_HFILES} ${VMWARE_HFILES}
Packit bf408e
Packit bf408e
OBJECT_FILES=main.o tools.o global_data.o memory.o filesys.o help.o task.o \
Packit bf408e
	build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o \
Packit bf408e
	alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o \
Packit bf408e
	arm.o arm64.o mips.o sparc64.o \
Packit bf408e
	extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o \
Packit bf408e
	lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \
Packit bf408e
	lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o \
Packit bf408e
	lkcd_x86_trace.o unwind_v1.o unwind_v2.o unwind_v3.o \
Packit bf408e
	unwind_x86_32_64.o unwind_arm.o \
Packit bf408e
	xen_hyper.o xen_hyper_command.o xen_hyper_global_data.o \
Packit bf408e
	xen_hyper_dump_tables.o kvmdump.o qemu.o qemu-load.o sadump.o ipcs.o \
Packit bf408e
	ramdump.o vmware_vmss.o \
Packit bf408e
	xen_dom0.o kaslr_helper.o
Packit bf408e
Packit bf408e
MEMORY_DRIVER_FILES=memory_driver/Makefile memory_driver/crash.c memory_driver/README
Packit bf408e
Packit bf408e
# These are the current set of crash extensions sources.  They are not built
Packit bf408e
# by default unless the third command line of the "all:" stanza is uncommented.
Packit bf408e
# Alternatively, they can be built by entering "make extensions" from this
Packit bf408e
# directory.
Packit bf408e
Packit bf408e
EXTENSIONS=extensions
Packit bf408e
EXTENSION_SOURCE_FILES=${EXTENSIONS}/Makefile ${EXTENSIONS}/echo.c ${EXTENSIONS}/dminfo.c \
Packit bf408e
	${EXTENSIONS}/snap.c ${EXTENSIONS}/snap.mk ${EXTENSIONS}/trace.c \
Packit bf408e
	${EXTENSIONS}/eppic.c ${EXTENSIONS}/eppic.mk
Packit bf408e
Packit bf408e
DAEMON_OBJECT_FILES=remote_daemon.o va_server.o va_server_v1.o \
Packit bf408e
	lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \
Packit bf408e
	s390_dump.o netdump_daemon.o
Packit bf408e
Packit bf408e
GDB_5.0_FILES=${GDB}/gdb/Makefile.in \
Packit bf408e
	  ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
	  ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \
Packit bf408e
	  ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
	  ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/gnu-regex.c \
Packit bf408e
	  ${GDB}/gdb/ppc-linux-nat.c
Packit bf408e
GDB_5.0_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \
Packit bf408e
          ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \
Packit bf408e
          ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \
Packit bf408e
          ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/gnu-regex.o \
Packit bf408e
          ${GDB}/gdb/ppc-linux-nat.o
Packit bf408e
Packit bf408e
GDB_5.1_FILES=${GDB}/gdb/Makefile.in \
Packit bf408e
	  ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
	  ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \
Packit bf408e
	  ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
	  ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c  ${GDB}/gdb/gnu-regex.c
Packit bf408e
GDB_5.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \
Packit bf408e
          ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \
Packit bf408e
          ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \
Packit bf408e
          ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/gnu-regex.o
Packit bf408e
Packit bf408e
GDB_5.2.1_FILES=${GDB}/gdb/Makefile.in \
Packit bf408e
          ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
          ${GDB}/gdb/blockframe.c ${GDB}/gdb/alpha-tdep.c \
Packit bf408e
          ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
          ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c
Packit bf408e
GDB_5.2.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o ${GDB}/gdb/target.o \
Packit bf408e
          ${GDB}/gdb/blockframe.o ${GDB}/gdb/alpha-tdep.o \
Packit bf408e
          ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \
Packit bf408e
          ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o 
Packit bf408e
Packit bf408e
GDB_5.3post-0.20021129.36rh_FILES=${GDB}/gdb/Makefile.in \
Packit bf408e
          ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
          ${GDB}/gdb/frame.c ${GDB}/gdb/alpha-tdep.c \
Packit bf408e
          ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
          ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/dwarf2read.c
Packit bf408e
GDB_5.3post-0.20021129.36rh_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \
Packit bf408e
          ${GDB}/gdb/target.o ${GDB}/gdb/frame.o ${GDB}/gdb/alpha-tdep.o \
Packit bf408e
          ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o ${GDB}/gdb/ui-file.o \
Packit bf408e
          ${GDB}/gdb/utils.o ${GDB}/gdb/dwarf2read.o
Packit bf408e
Packit bf408e
GDB_6.0_FILES=${GDB}/gdb/Makefile.in ${GDB}/Makefile.in \
Packit bf408e
          ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
          ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
          ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c \
Packit bf408e
	  ${GDB}/gdb/ppc-linux-tdep.c ${GDB}/sim/ppc/ppc-instructions \
Packit bf408e
	  ${GDB}/bfd/simple.c ${GDB}/include/obstack.h
Packit bf408e
GDB_6.0_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \
Packit bf408e
          ${GDB}/gdb/target.o ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \
Packit bf408e
          ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o \
Packit bf408e
	  ${GDB}/gdb/ppc-linux-tdep.o ${GDB}/bfd/simple.o
Packit bf408e
Packit bf408e
GDB_6.1_FILES=${GDB}/gdb/Makefile.in ${GDB}/Makefile.in \
Packit bf408e
          ${GDB}/gdb/main.c ${GDB}/gdb/symtab.c ${GDB}/gdb/target.c \
Packit bf408e
          ${GDB}/gdb/symfile.c ${GDB}/gdb/elfread.c \
Packit bf408e
          ${GDB}/gdb/ui-file.c ${GDB}/gdb/utils.c ${GDB}/gdb/dwarf2read.c \
Packit bf408e
          ${GDB}/include/obstack.h ${GDB}/gdb/ppc-linux-tdep.c
Packit bf408e
GDB_6.1_OFILES=${GDB}/gdb/main.o ${GDB}/gdb/symtab.o \
Packit bf408e
          ${GDB}/gdb/target.o ${GDB}/gdb/symfile.o ${GDB}/gdb/elfread.o \
Packit bf408e
          ${GDB}/gdb/ui-file.o ${GDB}/gdb/utils.o ${GDB}/gdb/dwarf2read.o \
Packit bf408e
          ${GDB}/gdb/ppc-linux-tdep.o
Packit bf408e
Packit bf408e
GDB_7.0_FILES=
Packit bf408e
GDB_7.0_OFILES=${GDB}/gdb/symtab.o
Packit bf408e
Packit bf408e
GDB_7.3.1_FILES=
Packit bf408e
GDB_7.3.1_OFILES=${GDB}/gdb/symtab.o
Packit bf408e
Packit bf408e
GDB_7.6_FILES=
Packit bf408e
GDB_7.6_OFILES=${GDB}/gdb/symtab.o
Packit bf408e
Packit bf408e
# 
Packit bf408e
# GDB_FLAGS is passed up from the gdb Makefile.
Packit bf408e
#
Packit bf408e
GDB_FLAGS=
Packit bf408e
Packit bf408e
#
Packit bf408e
# WARNING_OPTIONS and WARNING_ERROR are both applied on a per-file basis. 
Packit bf408e
# WARNING_ERROR is NOT used on files including "dirty" gdb headers so that 
Packit bf408e
# successful compilations can be achieved with acceptable warnings; its 
Packit bf408e
# usefulness is also dependent upon the processor's compiler -- your mileage
Packit bf408e
# may vary.
Packit bf408e
#
Packit bf408e
#WARNING_OPTIONS=-Wall -O2 -Wstrict-prototypes -Wmissing-prototypes -fstack-protector -Wformat-security
Packit bf408e
#WARNING_ERROR=-Werror
Packit bf408e
Packit bf408e
# TARGET_CFLAGS will be configured automatically by configure
Packit bf408e
TARGET_CFLAGS=
Packit bf408e
Packit Service b3827b
CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS}
Packit bf408e
Packit bf408e
GPL_FILES=
Packit bf408e
TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \
Packit bf408e
	${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES}
Packit bf408e
CSCOPE_FILES=${SOURCE_FILES}
Packit bf408e
Packit bf408e
READLINE_DIRECTORY=./${GDB}/readline
Packit bf408e
BFD_DIRECTORY=./${GDB}/bfd
Packit bf408e
GDB_INCLUDE_DIRECTORY=./${GDB}/include
Packit bf408e
Packit bf408e
REDHATFLAGS=-DREDHAT
Packit bf408e
Packit bf408e
# target could be set on command line when invoking make. Like: make target=ARM
Packit bf408e
# otherwise target will be the same as the host
Packit bf408e
ifneq ($(target),)
Packit bf408e
CONF_TARGET_FLAG="-t$(target)"
Packit bf408e
endif
Packit bf408e
Packit bf408e
# To build the extensions library by default, uncomment the third command
Packit bf408e
# line below.  Otherwise they can be built by entering "make extensions".
Packit bf408e
Packit bf408e
all: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -p "RPMPKG=${RPMPKG}" -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
#	@make --no-print-directory extensions
Packit bf408e
Packit bf408e
gdb_merge: force
Packit bf408e
	@if [ ! -f ${GDB}/README ]; then \
Packit bf408e
	  make --no-print-directory gdb_unzip; fi
Packit Service b3827b
	@echo "${LDFLAGS} -lz -ldl -rdynamic" > ${GDB}/gdb/mergelibs
Packit bf408e
	@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
Packit bf408e
	@rm -f ${PROGRAM}
Packit bf408e
	@if [ ! -f ${GDB}/config.status ]; then \
Packit bf408e
	  (cd ${GDB}; ./configure ${GDB_CONF_FLAGS} --with-separate-debug-dir=/usr/lib/debug \
Packit bf408e
	    --with-bugurl="" --with-expat=no --with-python=no --disable-sim; \
Packit bf408e
	  make --no-print-directory CRASH_TARGET=${TARGET}; echo ${TARGET} > crash.target) \
Packit bf408e
	else make --no-print-directory rebuild; fi
Packit bf408e
	@if [ ! -f ${PROGRAM} ]; then \
Packit bf408e
	  echo; echo "${PROGRAM} build failed"; \
Packit bf408e
	  echo; exit 1; fi
Packit bf408e
Packit bf408e
rebuild:
Packit bf408e
	@if [ ! -f ${GDB}/${GDB}.patch ]; then \
Packit bf408e
	  touch ${GDB}/${GDB}.patch; fi
Packit bf408e
	@if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ] && \
Packit bf408e
	  [ "`sum ${GDB}.patch`" != "`sum ${GDB}/${GDB}.patch`" ]; then \
Packit bf408e
	  (sh -x ${GDB}.patch ${TARGET}; patch -N -p0 -r- --fuzz=0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; cd ${GDB}; \
Packit bf408e
	  make --no-print-directory CRASH_TARGET=${TARGET}) \
Packit bf408e
	else (cd ${GDB}/gdb; make --no-print-directory CRASH_TARGET=${TARGET}); fi
Packit bf408e
Packit bf408e
gdb_unzip:
Packit bf408e
	@rm -f gdb.files
Packit bf408e
	@for FILE in ${GDB_FILES} dummy; do\
Packit bf408e
	  echo $$FILE >> gdb.files; done
Packit bf408e
	@if [ ! -f ${GDB}.tar.gz ] && [ ! -f /usr/bin/wget ]; then \
Packit bf408e
	  echo /usr/bin/wget is required to download ${GDB}.tar.gz; echo; exit 1; fi
Packit bf408e
	@if [ ! -f ${GDB}.tar.gz ] && [ -f /usr/bin/wget ]; then \
Packit bf408e
	  wget http://ftp.gnu.org/gnu/gdb/${GDB}.tar.gz; fi
Packit bf408e
	@tar --exclude-from gdb.files -xvzmf ${GDB}.tar.gz
Packit bf408e
	@make --no-print-directory gdb_patch
Packit bf408e
Packit bf408e
gdb_patch:
Packit bf408e
	if [ -f ${GDB}.patch ] && [ -s ${GDB}.patch ]; then \
Packit bf408e
		patch -p0 < ${GDB}.patch; cp ${GDB}.patch ${GDB}; fi
Packit bf408e
	if [ "${ARCH}" = "ppc64le" ] && [ -f ${GDB}-ppc64le-support.patch ]; then \
Packit bf408e
		patch -d ${GDB} -p1 -F0 < ${GDB}-ppc64le-support.patch ; \
Packit bf408e
	fi
Packit bf408e
	if [ "${ARCH}" = "x86_64" ] && [ "${TARGET}" = "PPC64" ] && [ -f ${GDB}-ppc64le-support.patch ]; then \
Packit bf408e
		patch -d ${GDB} -p1 -F0 < ${GDB}-ppc64le-support.patch ; \
Packit bf408e
	fi
Packit bf408e
	if [ -f /usr/include/proc_service.h ]; then \
Packit bf408e
		grep 'extern ps_err_e ps_get_thread_area (struct' /usr/include/proc_service.h; \
Packit bf408e
		if [ $$? -eq 0 ]; then \
Packit bf408e
			patch -p0 < ${GDB}-proc_service.h.patch; \
Packit bf408e
		fi; \
Packit bf408e
	fi
Packit bf408e
Packit bf408e
library: make_build_data ${OBJECT_FILES}
Packit bf408e
	ar -rs ${PROGRAM}lib.a ${OBJECT_FILES}
Packit bf408e
Packit bf408e
gdb: force
Packit bf408e
	rm -f ${GDB_OFILES}
Packit bf408e
	@make --no-print-directory all
Packit bf408e
Packit bf408e
force:
Packit bf408e
	
Packit bf408e
Packit bf408e
make_configure: force
Packit bf408e
	@rm -f configure
Packit bf408e
	@${CC} ${CONF_FLAGS} -o configure configure.c ${WARNING_ERROR} ${WARNING_OPTIONS}
Packit bf408e
Packit bf408e
clean: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -q -b
Packit bf408e
	@make --no-print-directory do_clean
Packit bf408e
Packit bf408e
do_clean:
Packit bf408e
	rm -f ${OBJECT_FILES} ${DAEMON_OBJECT_FILES} ${PROGRAM} ${PROGRAM}lib.a ${GDB_OFILES}
Packit bf408e
	@(cd extensions; make --no-print-directory -i clean)
Packit bf408e
	@(cd memory_driver; make --no-print-directory -i clean)
Packit bf408e
Packit bf408e
make_build_data: force
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} build_data.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
install:
Packit bf408e
	/usr/bin/install -d ${INSTALLDIR}
Packit bf408e
	/usr/bin/install ${PROGRAM} ${INSTALLDIR}
Packit bf408e
#	/usr/bin/install ${PROGRAM}d ${INSTALLDIR}
Packit bf408e
Packit bf408e
unconfig: make_configure
Packit bf408e
	@./configure -u
Packit bf408e
Packit bf408e
warn: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -w -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
Packit bf408e
Warn: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -W -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
Packit bf408e
nowarn: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -n -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
Packit bf408e
lzo: make_configure
Packit bf408e
	@./configure -x lzo ${CONF_TARGET_FLAG} -w -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
Packit bf408e
snappy: make_configure
Packit bf408e
	@./configure -x snappy ${CONF_TARGET_FLAG} -w -b
Packit bf408e
	@make --no-print-directory gdb_merge
Packit bf408e
Packit bf408e
main.o: ${GENERIC_HFILES} main.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} main.c ${WARNING_OPTIONS} ${WARNING_ERROR} 
Packit bf408e
Packit bf408e
cmdline.o: ${GENERIC_HFILES} cmdline.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} cmdline.c -I${READLINE_DIRECTORY} ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
tools.o: ${GENERIC_HFILES} tools.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} tools.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
global_data.o: ${GENERIC_HFILES} global_data.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} global_data.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
symbols.o: ${GENERIC_HFILES} symbols.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} symbols.c -I${BFD_DIRECTORY} -I${GDB_INCLUDE_DIRECTORY} ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
filesys.o: ${GENERIC_HFILES} filesys.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} filesys.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
help.o: ${GENERIC_HFILES} help.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} help.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
memory.o: ${GENERIC_HFILES} memory.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} memory.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
test.o: ${GENERIC_HFILES} test.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} test.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
task.o: ${GENERIC_HFILES} task.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} task.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
kernel.o: ${GENERIC_HFILES} kernel.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} kernel.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
gdb_interface.o: ${GENERIC_HFILES} gdb_interface.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} gdb_interface.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
va_server.o: ${MCORE_HFILES} va_server.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} va_server.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
va_server_v1.o: ${MCORE_HFILES} va_server_v1.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} va_server_v1.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_common.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_common.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_common.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_v1.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v1.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_v1.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_v2_v3.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v2_v3.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_v2_v3.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_v5.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v5.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_v5.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_v7.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v7.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_v7.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_v8.o: ${GENERIC_HFILES} ${LKCD_DUMP_HFILES} lkcd_v8.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_v8.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
net.o: ${GENERIC_HFILES} net.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} net.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
dev.o: ${GENERIC_HFILES} ${REDHAT_HFILES} dev.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} dev.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
# remote.c functionality has been deprecated
Packit bf408e
remote.o: ${GENERIC_HFILES} remote.c
Packit bf408e
	@${CC} -c ${CRASH_CFLAGS} remote.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
remote_daemon.o: ${GENERIC_HFILES} remote.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} -DDAEMON remote.c -o remote_daemon.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
x86.o: ${GENERIC_HFILES} ${REDHAT_HFILES} x86.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} x86.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
alpha.o: ${GENERIC_HFILES} alpha.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} alpha.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
ppc.o: ${GENERIC_HFILES} ppc.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} ppc.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
ia64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} ia64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} ia64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
ppc64.o: ${GENERIC_HFILES} ppc64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} ppc64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
x86_64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} x86_64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} x86_64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
arm.o: ${GENERIC_HFILES} ${REDHAT_HFILES} arm.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} arm.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
arm64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} arm64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} arm64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
mips.o: ${GENERIC_HFILES} ${REDHAT_HFILES} mips.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} mips.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
sparc64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} sparc64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} sparc64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
s390.o: ${GENERIC_HFILES} ${IBM_HFILES} s390.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} s390.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
s390x.o: ${GENERIC_HFILES} ${IBM_HFILES} s390x.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} s390x.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
s390dbf.o: ${GENERIC_HFILES} ${IBM_HFILES} s390dbf.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} s390dbf.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
s390_dump.o: ${GENERIC_HFILES} ${IBM_HFILES} s390_dump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} s390_dump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
netdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} ${SADUMP_HFILES} netdump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} netdump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
netdump_daemon.o: ${GENERIC_HFILES} ${REDHAT_HFILES} netdump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} -DDAEMON netdump.c -o netdump_daemon.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
diskdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} diskdump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} diskdump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
makedumpfile.o: ${GENERIC_HFILES} ${REDHAT_HFILES} makedumpfile.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} makedumpfile.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xendump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} xendump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xendump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
kvmdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} kvmdump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} kvmdump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
qemu.o: ${GENERIC_HFILES} ${REDHAT_HFILES} qemu.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} qemu.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
qemu-load.o: ${GENERIC_HFILES} ${REDHAT_HFILES} qemu-load.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} qemu-load.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
sadump.o: ${GENERIC_HFILES} ${SADUMP_HFILES} sadump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} sadump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
ipcs.o: ${GENERIC_HFILES} ipcs.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} ipcs.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
extensions.o: ${GENERIC_HFILES} extensions.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} extensions.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_x86_trace.o: ${GENERIC_HFILES} ${LKCD_TRACE_HFILES} lkcd_x86_trace.c 
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_x86_trace.c -DREDHAT ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
unwind_x86_32_64.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind_x86_32_64.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} unwind_x86_32_64.c -o unwind_x86_32_64.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
unwind_arm.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind_arm.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} unwind_arm.c -o unwind_arm.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
unwind_v1.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V1 -o unwind_v1.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
unwind_v2.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V2 -o unwind_v2.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
unwind_v3.o: ${GENERIC_HFILES} ${UNWIND_HFILES} unwind.c unwind_decoder.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} unwind.c -DREDHAT -DUNWIND_V3 -o unwind_v3.o ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
lkcd_fix_mem.o: ${GENERIC_HFILES} ${LKCD_HFILES} lkcd_fix_mem.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} lkcd_fix_mem.c -DMCLX ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xen_hyper.o: ${GENERIC_HFILES} xen_hyper.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xen_hyper.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xen_hyper_command.o: ${GENERIC_HFILES} xen_hyper_command.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xen_hyper_command.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xen_hyper_global_data.o: ${GENERIC_HFILES} xen_hyper_global_data.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xen_hyper_global_data.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xen_hyper_dump_tables.o: ${GENERIC_HFILES} xen_hyper_dump_tables.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xen_hyper_dump_tables.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
xen_dom0.o: ${GENERIC_HFILES} xen_dom0.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} xen_dom0.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
ramdump.o: ${GENERIC_HFILES} ${REDHAT_HFILES} ramdump.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} ramdump.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
vmware_vmss.o: ${GENERIC_HFILES} ${VMWARE_HFILES} vmware_vmss.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} vmware_vmss.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
kaslr_helper.o: ${GENERIC_HFILES} kaslr_helper.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} kaslr_helper.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
bpf.o: ${GENERIC_HFILES} bpf.c
Packit bf408e
	${CC} -c ${CRASH_CFLAGS} bpf.c ${WARNING_OPTIONS} ${WARNING_ERROR}
Packit bf408e
Packit bf408e
${PROGRAM}: force
Packit bf408e
	@make --no-print-directory all
Packit bf408e
Packit bf408e
# Remote daemon functionality has been deprecated.
Packit bf408e
daemon_deprecated: force
Packit bf408e
	@echo "WARNING: remote daemon functionality has been deprecated"
Packit bf408e
	@echo 
Packit bf408e
Packit bf408e
${PROGRAM}d: daemon_deprecated make_configure
Packit bf408e
	@./configure -d
Packit bf408e
	@make --no-print-directory make_build_data
Packit bf408e
	@make --no-print-directory daemon 
Packit bf408e
Packit bf408e
daemon: ${DAEMON_OBJECT_FILES}
Packit bf408e
	${CC} ${LDFLAGS} -o ${PROGRAM}d ${DAEMON_OBJECT_FILES} build_data.o -lz 
Packit bf408e
Packit bf408e
files: make_configure
Packit bf408e
	@./configure -q -b
Packit bf408e
	@make --no-print-directory show_files
Packit bf408e
Packit bf408e
gdb_files: make_configure
Packit bf408e
	@./configure -q -b
Packit bf408e
	@echo ${GDB_FILES} ${GDB_PATCH_FILES}
Packit bf408e
Packit bf408e
show_files:
Packit bf408e
	@if [ -f ${PROGRAM}  ]; then \
Packit bf408e
		./${PROGRAM} --no_scroll --no_crashrc -h README > README; fi
Packit bf408e
	@echo ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} ${GPL_FILES} README \
Packit bf408e
	.rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES}
Packit bf408e
Packit bf408e
ctags:
Packit bf408e
	ctags ${SOURCE_FILES}
Packit bf408e
Packit bf408e
tar: make_configure
Packit bf408e
	@./configure -q -b
Packit bf408e
	@make --no-print-directory do_tar
Packit bf408e
Packit bf408e
do_tar:
Packit bf408e
	@if [ -f ${PROGRAM}  ]; then \
Packit bf408e
		./${PROGRAM} --no_scroll --no_crashrc -h README > README; fi
Packit bf408e
	tar cvzf ${PROGRAM}.tar.gz ${TAR_FILES} ${GDB_FILES} ${GDB_PATCH_FILES}
Packit bf408e
	@echo; ls -l ${PROGRAM}.tar.gz
Packit bf408e
Packit bf408e
VERSION=
Packit bf408e
RELEASE=0
Packit bf408e
Packit bf408e
release: make_configure
Packit bf408e
	@if [ "`id --user`" != "0" ]; then \
Packit bf408e
		echo "make release: must be super-user"; exit 1; fi
Packit bf408e
	@./configure -P "RPMPKG=${RPMPKG}" -u -g
Packit bf408e
	@make --no-print-directory release_configure
Packit bf408e
	@echo 
Packit bf408e
	@echo "cvs tag this release if necessary"
Packit bf408e
Packit bf408e
release_configure: make_configure
Packit bf408e
	@if [ "${GDB}" = "" ] ; then \
Packit bf408e
		echo "make release: GDB not defined: append GDB=gdb-x.x to make command line"; echo; exit 1; fi 
Packit bf408e
	@./configure -r ${GDB}
Packit bf408e
	@make --no-print-directory do_release
Packit bf408e
Packit bf408e
do_release:
Packit bf408e
	@echo "CRASH VERSION: ${VERSION}  GDB VERSION: ${GDB}"
Packit bf408e
	@if [ ! -f .rh_rpm_package  ]; then \
Packit bf408e
		echo "no .rh_rpm_package exists!"; exit 1; fi
Packit bf408e
	@chmod 666 .rh_rpm_package
Packit bf408e
	@rm -rf ./RELDIR; mkdir ./RELDIR; mkdir ./RELDIR/${PROGRAM}-${VERSION}
Packit bf408e
	@rm -f ${PROGRAM}-${VERSION}.tar.gz 
Packit bf408e
	@rm -f ${PROGRAM}-${VERSION}-${RELEASE}.src.rpm
Packit bf408e
	@chown root ./RELDIR/${PROGRAM}-${VERSION}
Packit bf408e
	@tar cf - ${SOURCE_FILES} Makefile ${GDB_FILES} ${GDB_PATCH_FILES} ${GPL_FILES} \
Packit bf408e
	.rh_rpm_package crash.8 ${EXTENSION_SOURCE_FILES} ${MEMORY_DRIVER_FILES} | \
Packit bf408e
	(cd ./RELDIR/${PROGRAM}-${VERSION}; tar xf -)
Packit bf408e
	@cp ${GDB}.tar.gz ./RELDIR/${PROGRAM}-${VERSION}
Packit bf408e
	@./${PROGRAM} --no_scroll --no_crashrc -h README > README
Packit bf408e
	@cp README ./RELDIR/${PROGRAM}-${VERSION}/README
Packit bf408e
	@(cd ./RELDIR; find . -exec chown root {} ";")
Packit bf408e
	@(cd ./RELDIR; find . -exec chgrp root {} ";")
Packit bf408e
	@(cd ./RELDIR; find . -exec touch {} ";")
Packit bf408e
	@(cd ./RELDIR; \
Packit bf408e
		tar czvf ../${PROGRAM}-${VERSION}.tar.gz ${PROGRAM}-${VERSION})
Packit bf408e
	@chgrp root ${PROGRAM}-${VERSION}.tar.gz
Packit bf408e
	@rm -rf ./RELDIR
Packit bf408e
	@echo
Packit bf408e
	@ls -l ${PROGRAM}-${VERSION}.tar.gz
Packit bf408e
	@./configure -s -u > ${PROGRAM}.spec
Packit bf408e
	@if [ -s ${PROGRAM}.spec ]; then \
Packit bf408e
	  rm -rf ./RPMBUILD; \
Packit bf408e
	  mkdir -p ./RPMBUILD/SOURCES ./RPMBUILD/SPECS ./RPMBUILD/SRPMS; \
Packit bf408e
	  cp ${PROGRAM}-${VERSION}.tar.gz ./RPMBUILD/SOURCES; \
Packit bf408e
	  cp ${PROGRAM}.spec ./RPMBUILD/SPECS; \
Packit bf408e
	  rpmbuild --define "_sourcedir ./RPMBUILD/SOURCES" \
Packit bf408e
	    --define "_srcrpmdir ./RPMBUILD/SRPMS" \
Packit bf408e
	    --define "_specdir ./RPMBUILD/SPECS" \
Packit bf408e
	    --nodeps -bs ./RPMBUILD/SPECS/${PROGRAM}.spec > /dev/null; \
Packit bf408e
	   mv ./RPMBUILD/SRPMS/${PROGRAM}-${VERSION}-${RELEASE}.src.rpm . ; \
Packit bf408e
	   rm -rf ./RPMBUILD; \
Packit bf408e
	   ls -l ${PROGRAM}-${VERSION}-${RELEASE}.src.rpm; \
Packit bf408e
	fi
Packit bf408e
Packit bf408e
ref:
Packit bf408e
	make ctags cscope
Packit bf408e
Packit bf408e
cscope:
Packit bf408e
	rm -f cscope.files cscope_out
Packit bf408e
	for FILE in ${SOURCE_FILES}; do \
Packit bf408e
	echo $$FILE >> cscope.files; done
Packit bf408e
	cscope
Packit bf408e
Packit bf408e
glink: make_configure
Packit bf408e
	@./configure -q -b
Packit bf408e
	rm -f gdb
Packit bf408e
	ln -s ${GDB}/gdb gdb
Packit bf408e
	(cd ${GDB}/gdb; rm -f ${PROGRAM}; ln -s ../../${PROGRAM} ${PROGRAM})
Packit bf408e
Packit bf408e
name:
Packit bf408e
	@echo ${PROGRAM}
Packit bf408e
Packit bf408e
dis:
Packit bf408e
	objdump --disassemble --line-numbers ${PROGRAM} > ${PROGRAM}.dis
Packit bf408e
Packit bf408e
extensions: make_configure
Packit bf408e
	@./configure ${CONF_TARGET_FLAG} -q -b
Packit bf408e
	@make --no-print-directory do_extensions
Packit bf408e
Packit bf408e
do_extensions:
Packit bf408e
	@(cd extensions; make -i TARGET=$(TARGET) TARGET_CFLAGS="$(TARGET_CFLAGS)" GDB=$(GDB) GDB_FLAGS=$(GDB_FLAGS))
Packit bf408e
Packit bf408e
memory_driver: make_configure 
Packit bf408e
	@(cd memory_driver; make --no-print-directory -i)