pkgsrc/net/ishell/patches/patch-aa
2004-04-12 00:09:06 +00:00

59 lines
1.3 KiB
Text

$NetBSD: patch-aa,v 1.2 2004/04/12 00:09:06 minskim Exp $
--- Makefile.orig 2002-01-31 11:35:52.000000000 -0600
+++ Makefile
@@ -1,38 +1,24 @@
-CC = gcc
-CFLAGS1 = -O2 -Wall
-CFLAGS2 = -O2 -Wall -lsocket
-STRIP = strip
-
-default:
- @echo "-------------------------------"
- @echo "Make with the OS from the list:"
- @echo ""
- @echo "1.) linux"
- @echo "2.) bsd"
- @echo "3.) solaris"
- @echo ""
- @echo "ex: make bsd"
- @echo "-------------------------------"
+OWNCFLAGS = -O2 -Wall
+ish_OBJECTS = ish.o ish_main.o
+ishd_OBJECTS = ishd.o ish_main.o ish_open.o
-clean:
- /bin/rm -f ish ishd
-
-linux: clean cc1 fin
+all: ish ishd
-bsd: clean cc1 fin
+.c.o:
+ $(CC) -c $(CPPFLAGS) $(OWNCFLAGS) $(CFLAGS) $<
-solaris: clean cc2 fin
+ish: $(ish_OBJECTS)
+ $(CC) $(ish_OBJECTS) $(LDFLAGS) $(LIBS) -o $@
-cc1:
- $(CC) $(CFLAGS1) -o ish ish.c ish_main.c
- $(CC) $(CFLAGS1) -o ishd ishd.c ish_main.c ish_open.c
+ishd: $(ishd_OBJECTS)
+ $(CC) $(ishd_OBJECTS) $(LDFLAGS) $(LIBS) -o $@
-cc2:
- $(CC) $(CFLAGS2) -o ish ish.c ish_main.c
- $(CC) $(CFLAGS2) -o ishd ishd.c ish_main.c ish_open.c
+clean:
+ ${RM} -f ish ishd
-fin:
- $(STRIP) ish
- $(STRIP) ishd
+install:
+ ${BSD_INSTALL_PROGRAM} ./ish ${PREFIX}/bin/ishell
+ ${BSD_INSTALL_PROGRAM} ./ishd ${PREFIX}/sbin/ishelld
+.PHONY: all clean install