- 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+=$(CPPFLAGS)
|
||||
RANLIB?=ranlib
|
||||
RM?=rm -f
|
||||
|
||||
LIBPIDUTIL = libpidutil.a
|
||||
HEADERS = pidutil.h
|
||||
OBJS = pidutil.o
|
||||
OBJECTS = pidutil.o
|
||||
|
||||
all: $(LIBPIDUTIL)
|
||||
|
||||
$(LIBPIDUTIL) : $(OBJS)
|
||||
$(AR) rv $(LIBPIDUTIL) $?
|
||||
$(LIBPIDUTIL) : $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) $(LIBPIDUTIL) $?
|
||||
$(RANLIB) $(LIBPIDUTIL)
|
||||
|
||||
install: all
|
||||
@ -21,5 +22,5 @@ install: all
|
||||
install -C $(HEADERS) $(PREFIX)/include
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a a.out core temp.* $(LIBPIDUTIL)
|
||||
rm -fr *.dSYM
|
||||
$(RM) *.o *.a a.out core temp.* $(LIBPIDUTIL)
|
||||
$(RM) -r *.dSYM
|
||||
|
@ -13,7 +13,7 @@ static int _pidfile_remove(struct pidfh *pfh, int freeit);
|
||||
#define PROGNAME program_invocation_short_name
|
||||
#else
|
||||
#define PROGNAME getprogname()
|
||||
#endif /* __linux__ */
|
||||
#endif /* __linux__ */
|
||||
|
||||
static int
|
||||
pidfile_verify(const struct pidfh *pfh)
|
||||
|
12
pidutil.h
12
pidutil.h
@ -24,12 +24,12 @@
|
||||
|
||||
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);
|
||||
int pidfile_write(struct pidfh *pfh);
|
||||
int pidfile_close(struct pidfh *pfh);
|
||||
int pidfile_remove(struct pidfh *pfh);
|
||||
int pidfile_fileno(const struct pidfh *pfh);
|
||||
int pidfile_write(struct pidfh *pfh);
|
||||
int pidfile_close(struct pidfh *pfh);
|
||||
int pidfile_remove(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