|
Packit Service |
d4effb |
#
|
|
Packit Service |
d4effb |
# Copyright (C) 2016 FUJITSU LIMITED
|
|
Packit Service |
d4effb |
#
|
|
Packit Service |
d4effb |
# This program is free software; you can redistribute it and/or modify
|
|
Packit Service |
d4effb |
# it under the terms of the GNU General Public License as published by
|
|
Packit Service |
d4effb |
# the Free Software Foundation; either version 2 of the License, or
|
|
Packit Service |
d4effb |
# (at your option) any later version.
|
|
Packit Service |
d4effb |
#
|
|
Packit Service |
d4effb |
# This program is distributed in the hope that it will be useful,
|
|
Packit Service |
d4effb |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
d4effb |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit Service |
d4effb |
# GNU General Public License for more details.
|
|
Packit Service |
d4effb |
#
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
VERSION=1.0.7
|
|
Packit Service |
d4effb |
NAME=ptdump
|
|
Packit Service |
d4effb |
ARCH=UNSUPPORTED
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
ifeq ($(shell arch), x86_64)
|
|
Packit Service |
d4effb |
TARGET=X86_64
|
|
Packit Service |
d4effb |
TARGET_CFLAGS=
|
|
Packit Service |
d4effb |
ARCH=SUPPORTED
|
|
Packit Service |
d4effb |
endif
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
ifeq ($(shell /bin/ls /usr/include/crash/defs.h 2>/dev/null), /usr/include/crash/defs.h)
|
|
Packit Service |
d4effb |
INCDIR=/usr/include/crash
|
|
Packit Service |
d4effb |
endif
|
|
Packit Service |
d4effb |
ifeq ($(shell /bin/ls ./defs.h 2> /dev/null), ./defs.h)
|
|
Packit Service |
d4effb |
INCDIR=.
|
|
Packit Service |
d4effb |
endif
|
|
Packit Service |
d4effb |
ifeq ($(shell /bin/ls ../defs.h 2> /dev/null), ../defs.h)
|
|
Packit Service |
d4effb |
INCDIR=..
|
|
Packit Service |
d4effb |
endif
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
SUBDIR=ptdump
|
|
Packit Service |
d4effb |
TARGET_CFILES=$(SUBDIR)/fastdecode.c $(SUBDIR)/map.c ptdump.c
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
COMMON_CFLAGS=-Wall -I$(INCDIR) -fPIC -D$(TARGET)
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
all: ptdump.so
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
ptdump.so: $(TARGET_CFILES) $(INCDIR)/defs.h $(SUBDIR)/map.h
|
|
Packit Service |
d4effb |
ifeq ($(ARCH),UNSUPPORTED)
|
|
Packit Service |
d4effb |
@echo "ptdump: architecture not supported"
|
|
Packit Service |
d4effb |
else
|
|
Packit Service |
1f3856 |
gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic -o $@ $(TARGET_CFILES) -Wl,-z,now
|
|
Packit Service |
d4effb |
endif
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
debug: COMMON_CFLAGS+=-DDEBUG
|
|
Packit Service |
d4effb |
debug: all
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
create-archive:
|
|
Packit Service |
d4effb |
@git archive --format=tar --prefix=$(NAME)-$(VERSION)/ HEAD | \
|
|
Packit Service |
d4effb |
gzip > ./$(NAME)-$(VERSION).tar.gz
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
tag:
|
|
Packit Service |
d4effb |
@git tag $(VERSION)
|
|
Packit Service |
d4effb |
@echo tag:$(VERSION)
|
|
Packit Service |
d4effb |
|
|
Packit Service |
d4effb |
clean:
|
|
Packit Service |
d4effb |
rm -f *.so *.o $(SUBDIR)/*.so $(SUBDIR)/*.o
|
|
Packit Service |
d4effb |
|