- Improve Makefile
- Indenting
This commit is contained in:
parent
6c886a4584
commit
ac8d14bc26
11
Makefile
11
Makefile
@ -5,15 +5,16 @@ LDFLAGS=-L$(PREFIX)/lib
|
|||||||
CFLAGS=-Wall -Wextra -g -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
|
CFLAGS=-Wall -Wextra -g -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
|
||||||
CFLAGS+=$(CPPFLAGS)
|
CFLAGS+=$(CPPFLAGS)
|
||||||
RANLIB?=ranlib
|
RANLIB?=ranlib
|
||||||
|
RM?=rm -f
|
||||||
|
|
||||||
LIBPIDUTIL = libpidutil.a
|
LIBPIDUTIL = libpidutil.a
|
||||||
HEADERS = pidutil.h
|
HEADERS = pidutil.h
|
||||||
OBJS = pidutil.o
|
OBJECTS = pidutil.o
|
||||||
|
|
||||||
all: $(LIBPIDUTIL)
|
all: $(LIBPIDUTIL)
|
||||||
|
|
||||||
$(LIBPIDUTIL) : $(OBJS)
|
$(LIBPIDUTIL) : $(OBJECTS)
|
||||||
$(AR) rv $(LIBPIDUTIL) $?
|
$(AR) $(ARFLAGS) $(LIBPIDUTIL) $?
|
||||||
$(RANLIB) $(LIBPIDUTIL)
|
$(RANLIB) $(LIBPIDUTIL)
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
@ -21,5 +22,5 @@ install: all
|
|||||||
install -C $(HEADERS) $(PREFIX)/include
|
install -C $(HEADERS) $(PREFIX)/include
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.a a.out core temp.* $(LIBPIDUTIL)
|
$(RM) *.o *.a a.out core temp.* $(LIBPIDUTIL)
|
||||||
rm -fr *.dSYM
|
$(RM) -r *.dSYM
|
||||||
|
@ -13,7 +13,7 @@ static int _pidfile_remove(struct pidfh *pfh, int freeit);
|
|||||||
#define PROGNAME program_invocation_short_name
|
#define PROGNAME program_invocation_short_name
|
||||||
#else
|
#else
|
||||||
#define PROGNAME getprogname()
|
#define PROGNAME getprogname()
|
||||||
#endif /* __linux__ */
|
#endif /* __linux__ */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
pidfile_verify(const struct pidfh *pfh)
|
pidfile_verify(const struct pidfh *pfh)
|
||||||
|
12
pidutil.h
12
pidutil.h
@ -24,12 +24,12 @@
|
|||||||
|
|
||||||
struct pidfh;
|
struct pidfh;
|
||||||
|
|
||||||
int flopen(const char *_path, int _flags, ...);
|
int flopen(const char *_path, int _flags,...);
|
||||||
|
|
||||||
struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
|
struct pidfh *pidfile_open(const char *path, mode_t mode, pid_t *pidptr);
|
||||||
int pidfile_write(struct pidfh *pfh);
|
int pidfile_write(struct pidfh *pfh);
|
||||||
int pidfile_close(struct pidfh *pfh);
|
int pidfile_close(struct pidfh *pfh);
|
||||||
int pidfile_remove(struct pidfh *pfh);
|
int pidfile_remove(struct pidfh *pfh);
|
||||||
int pidfile_fileno(const struct pidfh *pfh);
|
int pidfile_fileno(const struct pidfh *pfh);
|
||||||
|
|
||||||
#endif /* _PIDUTIL_H */
|
#endif /* _PIDUTIL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user