PERFORCE change 104079 for review

Todd Miller millert at FreeBSD.org
Tue Aug 15 18:05:02 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=104079

Change 104079 by millert at millert_macbook on 2006/08/15 18:04:30

	Simpler Makefile

Affected files ...

.. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsecompat/Makefile#2 edit

Differences ...

==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsecompat/Makefile#2 (text+ko) ====

@@ -1,25 +1,25 @@
 include ../../../Makeconfig
 
-# Installation directories.
-PREFIX = $(DESTDIR)/usr
-LIBDIR = $(PREFIX)/lib
-SHLIBDIR = $(DESTDIR)/lib
+LIB =	secompat
+OBJS =	getline.o strndup.o
 
-LIBVERSION = 1
+CFLAGS += -Wall
 
-SRCS=   getline.c strndup.c
+AR = ar cq
+RANLIB = ranlib
+INSTALL = install
 
-LIBA=libsecompat.a 
-OBJS= $(patsubst %.c,%.o,$(SRCS))
+all: lib$(LIB).a
 
-all: $(LIBA)
+install: all
+	$(INSTALL) -o $(LIBOWN) -g $(LIBGRP) -m 0644 lib$(LIB).a \
+		$(DESTDIR)/usr/lib
+	$(RANLIB) $(DESTDIR)/usr/lib/lib$(LIB).a
 
-$(LIBA):  $(OBJS)
-	libtool -static -c -o $@ $^
+clean:
+	rm -f lib$(LIB).a $(OBJS)
 
-install:
-
-clean: 
-	rm -f $(OBJS) $(LIBA) $(TARGET) 
-
-.PHONY: install
+lib$(LIB).a:: $(OBJS)
+	rm -f lib$(LIB).a
+	$(AR) lib$(LIB).a `lorder $(OBJS) | tsort -q`
+	$(RANLIB) lib$(LIB).a


More information about the trustedbsd-cvs mailing list