diff options
Diffstat (limited to 'ar')
-rw-r--r-- | ar/Makefile | 27 | ||||
-rw-r--r-- | ar/arch.c | 7 | ||||
-rw-r--r-- | ar/arch.h | 6 | ||||
-rw-r--r-- | ar/conf-cc | 3 | ||||
-rw-r--r-- | ar/conf-ld | 5 |
5 files changed, 48 insertions, 0 deletions
diff --git a/ar/Makefile b/ar/Makefile new file mode 100644 index 0000000..e1fa243 --- /dev/null +++ b/ar/Makefile @@ -0,0 +1,27 @@ +DIR=.. + +include ${DIR}/Makefile_base + +arch.o : compile arch.c arch.h + @./compile arch.c + +arch.a : load arch.o + @./load s arch.a arch.o + +# HIGH LEVEL SPECIFIC TARGETS + +SUBDIR= + +arch: buildarch + -@./buildarch ${SUBDIR} + +build: arch.a + +doc : doxy_conf + @echo -e "$(CYAN)calling doxygen$(NORM)" + @doxygen doxy_conf + @echo -e "$(CYAN)done.$(NORM)" + +clean: cleanstd + @if [ -f main ] ; then rm main; fi + diff --git a/ar/arch.c b/ar/arch.c new file mode 100644 index 0000000..adcd939 --- /dev/null +++ b/ar/arch.c @@ -0,0 +1,7 @@ +#include "arch.h" +#include <stdio.h> + +void arch() +{ + printf("hello world from a static library.\n"); +} diff --git a/ar/arch.h b/ar/arch.h new file mode 100644 index 0000000..c07182f --- /dev/null +++ b/ar/arch.h @@ -0,0 +1,6 @@ +#ifndef __ARCH_H +#define __ARCH_H + +void arch(); + +#endif /* __ARCH_H */ diff --git a/ar/conf-cc b/ar/conf-cc new file mode 100644 index 0000000..fe4e9cb --- /dev/null +++ b/ar/conf-cc @@ -0,0 +1,3 @@ +gcc -O2 -Wall -ansi -pedantic-errors -fomit-frame-pointer -D_GNU_SOURCE + +This will be used to compile .c files. diff --git a/ar/conf-ld b/ar/conf-ld new file mode 100644 index 0000000..2694d12 --- /dev/null +++ b/ar/conf-ld @@ -0,0 +1,5 @@ +gcc -s -shared -Wl,-soname, + +you may need to use -Wl,export-dynamic for reverse dependencies +remember to use -Wl,-rpath for library client program during developement +This will be used to link .o files into an executable. |