Made Makefile concurrent so that it can be compiled with -jN
This commit is contained in:
parent
0bf838eb8c
commit
434f0b930e
8 changed files with 44 additions and 32 deletions
|
|
@ -55,7 +55,7 @@ CLIXON_MAJOR = @CLIXON_VERSION_MAJOR@
|
|||
CLIXON_MINOR = @CLIXON_VERSION_MINOR@
|
||||
|
||||
# Use this clixon lib for linking
|
||||
CLIXON_LIB = libclixon.so.$(CLIXON_MAJOR).$(CLIXON_MINOR)
|
||||
CLIXON_LIB = libclixon$(SH_SUFFIX).$(CLIXON_MAJOR).$(CLIXON_MINOR)
|
||||
|
||||
# For dependency. A little strange that we rely on it being built in the src dir
|
||||
# even though it may exist in $(libdir). But the new version may not have been installed yet.
|
||||
|
|
@ -89,13 +89,17 @@ MYLIBSO = $(MYLIBLINK).$(CLIXON_MAJOR)
|
|||
|
||||
all: $(MYLIB) $(APPL) test
|
||||
|
||||
# Dependency of clixon library
|
||||
$(top_srcdir)/lib/src/$(CLIXON_LIB):
|
||||
(cd $(top_srcdir)/lib/src && $(MAKE) $(MFLAGS) $(CLIXON_LIB))
|
||||
|
||||
clean:
|
||||
rm -f *.core $(APPL) $(APPOBJ) $(LIBOBJ) $(MYLIB) $(MYLIBSO) $(MYLIBLINK)
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile *~ .depend test test.c
|
||||
|
||||
# Put demon in bin
|
||||
# Put daemon in bin
|
||||
# Put other executables in libexec/
|
||||
# Also create a libexec/ directory for writeable/temporary files.
|
||||
# Put config file in etc/
|
||||
|
|
@ -129,13 +133,13 @@ install-include: clixon_backend.h clixon_backend_handle.h clixon_backend_transac
|
|||
test.c :
|
||||
echo "int main(){}" > $@
|
||||
|
||||
test: test.c $(LIBOBJ)
|
||||
test: test.c $(LIBOBJ) $(MYLIB)
|
||||
$(CC) $(INCLUDES) $(LDFLAGS) $< $(LIBOBJ) -L. $(MYLIB) $(LIBS) -o $@
|
||||
|
||||
$(APPL) : $(APPOBJ) $(MYLIBLINK) $(LIBDEPS)
|
||||
$(CC) $(LDFLAGS) $(APPOBJ) -L. $(MYLIB) $(LIBS) -o $@
|
||||
|
||||
$(MYLIB): $(LIBOBJ)
|
||||
$(MYLIB): $(LIBOBJ) $(LIBDEPS)
|
||||
ifeq ($(HOST_VENDOR),apple)
|
||||
$(CC) $(LDFLAGS) -shared -undefined dynamic_lookup -o $@ -lc $(LIBOBJ)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue