Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
P
procps
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jan Rybar
procps
Commits
b5dd2dec
Commit
b5dd2dec
authored
Oct 08, 2002
by
albert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non-working new Makefile
parent
609ee430
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
0 deletions
+108
-0
proc/module.mk
proc/module.mk
+69
-0
ps/module.mk
ps/module.mk
+39
-0
No files found.
proc/module.mk
0 → 100644
View file @
b5dd2dec
# Google "recursive make considered harmful" for how this works.
SRC
+=
$(
wildcard
proc/
*
.c
)
$(
wildcard
proc/
*
.c
)
------
# PROJECT SPECIFIC MACROS
NAME
=
proc
# INSTALLATION OPTIONS
TOPDIR
=
/usr
HDRDIR
=
$(TOPDIR)
/include/
$(NAME)
# where to put .h files
LIBDIR
=
$(TOPDIR)
/lib# where to put library files
SHLIBDIR
=
/lib# where to put shared library files
HDROWN
=
$(OWNERGROUP)
# owner of header files
LIBOWN
=
$(OWNERGROUP)
# owner of library files
INSTALL
=
install
SRC
=
$(
sort
$(
wildcard
*
.c
)
$(
filter
%.c,
$(RCSFILES)
))
HDR
=
$(
sort
$(
wildcard
*
.h
)
$(
filter
%.h,
$(RCSFILES)
))
OBJ
=
$(SRC:.c=.o)
SONAME
=
lib
$(NAME)
.so.
$(LIBVERSION)
ifeq
($(SHARED),1)
CFLAGS
+=
-fpic
all
:
lib$(NAME).a $(SONAME)
else
all
:
lib$(NAME).a
endif
lib$(NAME).a
:
$(OBJ)
$(AR)
rcs
$@
$^
$(SONAME)
:
$(OBJ)
gcc
-shared
-Wl
,-soname,
$(SONAME)
-o
$@
$^
-lc
ln
-sf
$(SONAME)
lib
$(NAME)
.so
# AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT
.depend
:
$(
strip
$(CC)
$(CFLAGS)
-MM
-MG
$(SRC)
>
.depend
)
-include
.depend
# INSTALLATION
install
:
all
if
!
[
-d
$(HDRDIR)
]
;
then
mkdir
$(HDRDIR)
;
fi
$(INSTALL)
$(HDROWN)
$(HDR)
$(TOPDIR)
/include/
$(NAME)
$(INSTALL)
$(LIBOWN)
lib
$(NAME)
.a
$(LIBDIR)
ifeq
($(SHARED),1)
$(INSTALL)
$(LIBOWN)
$(SONAME)
$(SHLIBDIR)
cd
$(SHLIBDIR)
&&
ln
-sf
$(SONAME)
lib
$(NAME)
.so
ldconfig
endif
# CUSTOM c -> o rule so that command-line has minimal whitespace
%.o
:
%.c
$(
strip
$(CC)
$(CFLAGS)
-c
$<
)
version.o
:
version.c version.h
ifdef
MINORVERSION
$(
strip
$(CC)
$(CFLAGS)
-DVERSION
=
\"
$(VERSION)
\"
-DSUBVERSION
=
\"
$(SUBVERSION)
\"
-DMINORVERSION
=
\"
$(MINORVERSION)
\"
-c
version.c
)
else
$(
strip
$(CC)
$(CFLAGS)
-DVERSION
=
\"
$(VERSION)
\"
-DSUBVERSION
=
\"
$(SUBVERSION)
\"
-c
version.c
)
endif
ps/module.mk
0 → 100755
View file @
b5dd2dec
INSTALL
+=
install_ps
-----
all
:
ps
ps
:
escape.o global.o help.o select.o sortformat.o output.o parser.o display.o
$(CC)
-o
ps escape.o global.o help.o
select
.o sortformat.o output.o parser.o display.o
-L
../proc
-lproc
# This just adds the stacktrace code
debug
:
escape.o global.o help.o select.o sortformat.o output.o parser.o display.o stacktrace.o
$(CC)
-o
ps escape.o global.o help.o
select
.o sortformat.o output.o parser.o display.o stacktrace.o
-L
../proc
-lproc
-lefence
sortformat.o
:
sortformat.c common.h
global.o
:
global.c common.h
escape.o
:
escape.c
help.o
:
help.c
select.o
:
select.c common.h
output.o
:
output.c common.h
parser.o
:
parser.c common.h
display.o
:
display.c common.h
stacktrace.o
:
stacktrace.c
install
:
ps
install
$(OWNERGROUP)
--mode
a
=
rx
--strip
ps
$(BINDIR)
/ps
install
$(OWNERGROUP)
--mode
a
=
r ps.1
$(MAN1DIR)
/ps.1
-
rm
-f
$(DESTDIR)
/var/catman/cat1/ps.1.gz
$(DESTDIR)
/var/man/cat1/ps.1.gz
clean
:
rm
-f
*
.o DEADJOE
*
~ core ps gmon.out
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment