Makefile: compile libiast.a
This commit is contained in:
parent
fdeaf3602b
commit
5a14ecb688
3 changed files with 15 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
*.a
|
||||||
*.o
|
*.o
|
||||||
*.d
|
*.d
|
||||||
/iast
|
/iast
|
||||||
|
|
16
Makefile.in
16
Makefile.in
|
@ -1,6 +1,9 @@
|
||||||
PROGNAME = @PROGNAME@
|
PROGNAME = @PROGNAME@
|
||||||
|
LIBNAME = lib@PROGNAME@
|
||||||
|
ANAME = $(LIBNAME).a
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
|
AR = @AR@
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -9,6 +12,7 @@ MKDIR_P = @MKDIR_P@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
|
libdir = @libdir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
|
|
||||||
|
@ -32,9 +36,12 @@ all: $(PROGNAME) tests/test $(PROGNAME).1.gz
|
||||||
|
|
||||||
include $(wildcard *.d tests/*.d)
|
include $(wildcard *.d tests/*.d)
|
||||||
|
|
||||||
$(PROGNAME): main.o $(OBJECTS)
|
$(PROGNAME): main.o $(ANAME)
|
||||||
$(QUIET_LD) $(CC) $^ -o $@ $(LFLAGS)
|
$(QUIET_LD) $(CC) $^ -o $@ $(LFLAGS)
|
||||||
|
|
||||||
|
$(ANAME): $(OBJECTS)
|
||||||
|
$(QUIET_AR) $(AR) rcs $@ $^
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
tests/test
|
tests/test
|
||||||
|
|
||||||
|
@ -51,17 +58,19 @@ tests/test: $(OBJECTS) $(TEST_OBJECTS)
|
||||||
$(QUIET_GEN) cat $< | gzip -f >$@
|
$(QUIET_GEN) cat $< | gzip -f >$@
|
||||||
|
|
||||||
install:
|
install:
|
||||||
$(MKDIR_P) $(bindir) $(mandir)/man1
|
$(MKDIR_P) $(bindir) $(libdir) $(mandir)/man1
|
||||||
$(INSTALL_PROGRAM) $(PROGNAME) $(bindir)
|
$(INSTALL_PROGRAM) $(PROGNAME) $(bindir)
|
||||||
|
$(INSTALL_DATA) $(ANAME) $(libdir)
|
||||||
$(INSTALL_DATA) $(PROGNAME).1.gz $(mandir)/man1
|
$(INSTALL_DATA) $(PROGNAME).1.gz $(mandir)/man1
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(bindir)/$(PROGNAME)
|
$(RM) $(bindir)/$(PROGNAME)
|
||||||
|
$(RM) $(libdir)/$(ANAME)
|
||||||
$(RM) $(mandir)/man1/$(PROGNAME).1.gz
|
$(RM) $(mandir)/man1/$(PROGNAME).1.gz
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(PROGNAME) tests/test $(PROGNAME).1.gz
|
$(RM) $(PROGNAME) tests/test $(PROGNAME).1.gz
|
||||||
$(RM) -r *.o */*.o */*.d *.d *.gcda *.gcno tests/coverage
|
$(RM) -r *.a *.o */*.o */*.d *.d *.gcda *.gcno tests/coverage
|
||||||
|
|
||||||
clean-aux:
|
clean-aux:
|
||||||
$(RM) -r $(AUX_FILES)
|
$(RM) -r $(AUX_FILES)
|
||||||
|
@ -81,5 +90,6 @@ endif
|
||||||
ifndef V
|
ifndef V
|
||||||
QUIET_CC = @echo " CC $@";
|
QUIET_CC = @echo " CC $@";
|
||||||
QUIET_LD = @echo " CCLD $@";
|
QUIET_LD = @echo " CCLD $@";
|
||||||
|
QUIET_AR = @echo " AR $@";
|
||||||
QUIET_GEN = @echo " GEN $@";
|
QUIET_GEN = @echo " GEN $@";
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -14,6 +14,7 @@ AC_DEFINE_UNQUOTED([PROGNAME], ["$PROGNAME"], [Name of the target binary])
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_MKDIR_P
|
AC_PROG_MKDIR_P
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
AC_CHECK_TOOL([AR], [ar])
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
PKG_CHECK_MODULES(CHECK, check)
|
PKG_CHECK_MODULES(CHECK, check)
|
||||||
|
|
Loading…
Reference in a new issue