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