1# Makefile for utelnetd 2# 3# Configure this with the following environment variables: 4# 5 6# where to install 7INSTDIR := /usr/local/bin/ 8 9# GNU target string 10#CROSS := 11 12# where to find login program 13ifneq ("", "$(BSD)") 14LOGIN := /usr/bin/login 15else 16LOGIN := /bin/login 17endif 18 19ifneq ("", "$(BSD)") 20CORE := utelnetd.core 21else 22CORE := core 23endif 24 25# nothing to configure below this line... ---8<---8<---8<--- 26 27PROGS = utelnetd 28 29INSTMODE = 0755 30INSTOWNER = root 31INSTGROUP = root 32 33OBJS = utelnetd.o 34 35#CC = $(CROSS)gcc 36INSTALL = install 37 38#CFLAGS += -I. -pipe -DSHELLPATH=\"$(LOGIN)\" -Wall 39CFLAGS += -I. -I$(SRCBASE)/include -pipe -DSHELLPATH=\"$(LOGIN)\" -Wall 40 41ifneq ("","$(DEBUG)") 42CFLAGS += -DDEBUG -g -Os 43STRIP = \# 44else 45CFLAGS += -fomit-frame-pointer 46#STRIP = $(CROSS)strip 47endif 48 49ifeq ("1", "$(BSD)") 50CFLAGS += -DBSD 51endif 52 53 54all: $(PROGS) 55 56$(PROGS): $(OBJS) 57 #$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ 58 $(CC) $(LDFLAGS) -L$(TOP)/nvram -lnvram -s $^ $(LDLIBS) -o $@ 59# $(STRIP) --remove-section=.comment --remove-section=.note $@ 60 $(STRIP) $@ 61 62.PHONY: install 63install: $(PROGS) 64 $(INSTALL) -d $(INSTDIR) 65 $(INSTALL) -m $(INSTMODE) -o $(INSTOWNER) -g $(INSTGROUP) $(PROGS) $(INSTDIR) 66 67.PHONY: clean 68clean: 69 rm -f $(PROGS) *.o $(CORE) 70