- Improve Makefile

- Indenting
This commit is contained in:
Babak Farrokhi 2015-11-01 12:03:57 +03:30
parent 6c886a4584
commit ac8d14bc26
3 changed files with 13 additions and 12 deletions

View File

@ -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

View File

@ -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)

View File

@ -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 */