I'm going to change the extensions/Makefile to the attached version, which will build any solo .c file with the traditional compile line. For special-case extensions that require a different build procedure, like sial.c, an accompanying sial.mk file should also exist in the extensions directory. And, many thanks to Jeff Moyer for whipping the Makefile into shape. Thanks, Dave
# # Makefile for building crash shared object extensions # # Copyright (C) 2005, 2007 David Anderson # Copyright (C) 2005, 2007 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of 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. # # 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. # # To build the extension shared objects in this directory, run # "make extensions" from the top-level directory. # # To add a new extension object, simply copy your module's .c file # to this directory, and it will be built automatically using # the "standard" compile line. If that compile line does not # suffice, create a .mk file with the same prefix as the .c file, # and that makefile will be invoked. # CONTRIB_SO := $(patsubst %.c,%.so,$(wildcard *.c)) all: link_defs $(CONTRIB_SO) link_defs: @if [ ! -f defs.h ]; then \ ln -s ../defs.h; fi $(CONTRIB_SO): %.so: %.c @if [ -f $*.mk ]; then \ make -f $*.mk; \ else \ echo "gcc -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS)"; \ gcc -nostartfiles -shared -rdynamic -o $@ $*.c -fPIC -D$(TARGET) $(TARGET_CFLAGS); \ fi
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility