1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Added a very simple test program, just to see how much of the library

it will pull in when linked.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14856 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-03-03 15:12:18 +00:00
parent 0deb0e3e2d
commit 2c3bd39f71
5 changed files with 47 additions and 10 deletions

View File

@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.68k,v 1.4 2005-03-03 15:02:24 obarthel Exp $ # $Id: GNUmakefile.68k,v 1.5 2005-03-03 15:12:18 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@ -47,11 +47,11 @@ LIBS = -lm -lc -lgcc
############################################################################## ##############################################################################
all: test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test \ all: test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test \
translate_test strtok_test uname translate_test strtok_test uname simple
clean: clean:
$(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test sprintf_test \ $(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test sprintf_test \
stack_size_test translate_test strtok_test uname stack_size_test translate_test strtok_test uname simple
############################################################################## ##############################################################################
@ -91,10 +91,14 @@ translate_test : translate_test.o
@echo "Linking $@" @echo "Linking $@"
$(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map $(CC) $(CFLAGS) -o $@ translate_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
uname: uname.o uname : uname.o
@echo "Linking $@" @echo "Linking $@"
$(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map $(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
simple : simple.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ simple.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
############################################################################## ##############################################################################
mkid: mkid:

View File

@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.os4,v 1.4 2005-03-03 15:02:25 obarthel Exp $ # $Id: GNUmakefile.os4,v 1.5 2005-03-03 15:12:18 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@ -39,11 +39,11 @@ LIBS = -lm -lc
############################################################################## ##############################################################################
all: test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test \ all: test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test \
translate_test strtok_test uname translate_test strtok_test uname simple
clean: clean:
$(DELETE) *.o *.map test fgets_test iotest sscanf_test printf_test sprintf_test \ $(DELETE) *.o *.map test fgets_test iotest sscanf_test printf_test sprintf_test \
stack_size_test translate_test strtok_test uname stack_size_test translate_test strtok_test uname simple
############################################################################## ##############################################################################
@ -86,3 +86,7 @@ translate_test : translate_test.o
uname : uname.o uname : uname.o
@echo "Linking $@" @echo "Linking $@"
$(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map $(CC) $(CFLAGS) -o $@ uname.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map
simple : simple.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ simple.o $(LIBS) -Wl,--cref,-M,-Map=$@.map

13
test_programs/simple.c Normal file
View File

@ -0,0 +1,13 @@
/*
* $Id: simple.c,v 1.1 2005-03-03 15:12:18 obarthel Exp $
*
* :ts=4
*/
/****************************************************************************/
int
main(int argc,char ** argv)
{
return(0);
}

View File

@ -1,5 +1,5 @@
# #
# $Id: smakefile,v 1.4 2005-03-03 15:02:26 obarthel Exp $ # $Id: smakefile,v 1.5 2005-03-03 15:12:18 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@ -63,10 +63,13 @@ AFLAGS = \
############################################################################## ##############################################################################
all: setup test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test translate_test strtok_test uname cleanup all: \
setup \
test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test translate_test strtok_test uname simple \
cleanup
clean: clean:
-delete \#?.o \#?.map test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test translate_test strtok_test uname -delete \#?.o \#?.map test fgets_test iotest sscanf_test printf_test sprintf_test stack_size_test translate_test strtok_test uname simple
############################################################################## ##############################################################################
@ -130,6 +133,11 @@ uname: uname.o
@slink $(LIB)startup.o uname.o to $@ lib $(LIB)c.lib addsym \ @slink $(LIB)startup.o uname.o to $@ lib $(LIB)c.lib addsym \
map $@.map,fhx fwidth 32 pwidth 32 swidth 32 map $@.map,fhx fwidth 32 pwidth 32 swidth 32
simple: simple.o
@echo "Linking $@"
@slink $(LIB)startup.o simple.o to $@ lib $(LIB)c.lib addsym \
map $@.map,fhx fwidth 32 pwidth 32 swidth 32
############################################################################## ##############################################################################
mkid: mkid:

View File

@ -1,3 +1,11 @@
/*
* $Id: uname.c,v 1.2 2005-03-03 15:12:18 obarthel Exp $
*
* :ts=4
*/
/****************************************************************************/
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>