blob: 484aa6b3bc38344d9a4c9e3a2c21dcbc13f27774 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# $Id: Makefile.linux,v 1.6 2007-10-31 03:38:05 davidm Exp $
2
3DESTDIR = $(INSTROOT)@DESTDIR@
4BINDIR = $(DESTDIR)/sbin
5MANDIR = $(DESTDIR)/share/man/man8
6
7CDEF1= -DTERMIOS # Use the termios structure
8CDEF2= -DSIGTYPE=void # Standard definition
9CDEF3= -UNO_SLEEP # Use the usleep function
10CDEF4= -DFNDELAY=O_NDELAY # Old name value
11CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
12
13#COPTS= -O2 -g -pipe
14CFLAGS+=$(COPTS) $(CDEFS)
15
16ifdef CONFIG_USER_CHAT_CHAT_NETWORK
17CFLAGS += -DENABLE_NETWORK_SUPPORT=0
18endif
19
20INSTALL= install
21
22all: chat
23
24chat: chat.o
25 $(CC) $(LDFLAGS) -o chat chat.o $(LDLIBS$(LDLIBS_$@))
26
27chat.o: chat.c
28 $(CC) -c $(CFLAGS) -o chat.o chat.c
29
30install: chat
31 mkdir -p $(BINDIR) $(MANDIR)
32 $(INSTALL) -s -c chat $(BINDIR)
33 $(INSTALL) -c -m 644 chat.8 $(MANDIR)
34
35romfs:
36 $(ROMFSINST) chat /bin/chat
37 $(ROMFSINST) initchat /etc_ro/initchat
38
39clean:
40 rm -f chat.o chat *~