| # $Id: Makefile.linux,v 1.6 2007-10-31 03:38:05 davidm Exp $ |
| |
| DESTDIR = $(INSTROOT)@DESTDIR@ |
| BINDIR = $(DESTDIR)/sbin |
| MANDIR = $(DESTDIR)/share/man/man8 |
| |
| CDEF1= -DTERMIOS # Use the termios structure |
| CDEF2= -DSIGTYPE=void # Standard definition |
| CDEF3= -UNO_SLEEP # Use the usleep function |
| CDEF4= -DFNDELAY=O_NDELAY # Old name value |
| CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4) |
| |
| #COPTS= -O2 -g -pipe |
| CFLAGS+=$(COPTS) $(CDEFS) |
| |
| ifdef CONFIG_USER_CHAT_CHAT_NETWORK |
| CFLAGS += -DENABLE_NETWORK_SUPPORT=0 |
| endif |
| |
| INSTALL= install |
| |
| all: chat |
| |
| chat: chat.o |
| $(CC) $(LDFLAGS) -o chat chat.o $(LDLIBS$(LDLIBS_$@)) |
| |
| chat.o: chat.c |
| $(CC) -c $(CFLAGS) -o chat.o chat.c |
| |
| install: chat |
| mkdir -p $(BINDIR) $(MANDIR) |
| $(INSTALL) -s -c chat $(BINDIR) |
| $(INSTALL) -c -m 644 chat.8 $(MANDIR) |
| |
| romfs: |
| $(ROMFSINST) chat /bin/chat |
| $(ROMFSINST) initchat /etc_ro/initchat |
| |
| clean: |
| rm -f chat.o chat *~ |