# HG changeset patch # User tuomov # Date 977340842 -3600 # Node ID a2715cff4288891417c39f4bed2605cc6607ab08 # Parent 01745c3150ad2ad6272b9e567e401dc1723392f5 trunk: changeset 32 Use 'ranlib' instead of 'ar s'. diff -r 01745c3150ad -r a2715cff4288 Makefile --- a/Makefile Sat Nov 04 21:29:33 2000 +0100 +++ b/Makefile Wed Dec 20 20:34:02 2000 +0100 @@ -38,7 +38,8 @@ libtu.a: $(OBJS) $(AR) $(ARFLAGS) $@ $+ - + $(RANLIB) $@ + tester: tester.c libtu.a $(CC) $(CFLAGS) $< -L. -ltu -lm -o $@ diff -r 01745c3150ad -r a2715cff4288 rules.mk --- a/rules.mk Sat Nov 04 21:29:33 2000 +0100 +++ b/rules.mk Wed Dec 20 20:34:02 2000 +0100 @@ -41,15 +41,26 @@ .c.o: $(CC) $(CFLAGS) -c $< -o $@ -_clean: - rm -f core $(OBJS) $(DEPEND_FILE) $(TO_CLEAN) +ifdef OBJS -_realclean: _clean - rm -f $(TARGETS) $(TO_REALCLEAN) +_clean: + rm -f core $(DEPEND_FILE) $(OBJS) _depend: $(MAKE_DEPEND) *.c +else + +_clean: + +_depend: + +endif + +_realclean: _clean + rm -f $(TARGETS) + + ###################################### subdirs: diff -r 01745c3150ad -r a2715cff4288 system.mk --- a/system.mk Sat Nov 04 21:29:33 2000 +0100 +++ b/system.mk Wed Dec 20 20:34:02 2000 +0100 @@ -33,7 +33,7 @@ CC=gcc -# The ANSI_SOURCE, XOPEN_SOURCE and WARN options should not be necessary, +# The POSIX_SOURCE, XOPEN_SOURCE and WARN options should not be necessary, # they're mainly for development use. So, if they cause trouble (not # the ones that should be used on your system or the system is broken), # just comment them out. @@ -42,19 +42,21 @@ POSIX_SOURCE=-ansi -D_POSIX_SOURCE -# and . (pwm) XOPEN_SOURCE +# and . (ion) XOPEN_SOURCE. +# There is variation among systems what should be used and how they interpret +# it so it is perhaps better not using anything at all. -# This should be used for gnu libc (linux), but SA_RESTART seems to be -# broken so don't use anything. +# Most systems #XOPEN_SOURCE=-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED -# Some other systems. +# sunos, (irix) #XOPEN_SOURCE=-ansi -D__EXTENSIONS__ # Same as '-Wall -pedantic-errors' without '-Wunused' as callbacks often # have unused variables. WARN= -W -Wimplicit -Wreturn-type -Wswitch -Wcomment \ - -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized \ - -Wparentheses -pedantic-errors + -Wtrigraphs -Wformat -Wchar-subscripts \ + -Wparentheses -pedantic-errors -Wuninitialized + CFLAGS=-g -O2 $(WARN) $(DEFINES) $(INCLUDES) $(EXTRA_INCLUDES) LDFLAGS=-g $(LIBS) $(EXTRA_LIBS) @@ -73,16 +75,20 @@ ## AR=ar -ARFLAGS=crs +ARFLAGS=cr +RANLIB=ranlib ## ## Install & strip ## -INSTALL=install -c -# bsdinst or bsdinst.sh should do the job under IRIX. In theory. -#INSTALL=bsdinst -c +# Should work almost everywhere +INSTALL=install +# On a system with pure BSD install, -c might be preferred +#INSTALL=install -c + +INSTALLDIR=mkdir -p BIN_MODE=755 DATA_MODE=664