makefile
747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
BASE = ..
include $(BASE)/port.mak
CFLAGS = -O2 -Wall -Werror -Wno-unused -g -I$(INCDIR) -DTARGET_$(TARGET)
LINUX_EXAMPLES = chat/client chat/server rdmchat/client rdmchat/server
DJGPP_EXAMPLES = chat/client chat/server rdmchat/client rdmchat/server
FREEBSD_EXAMPLES =
RSXNTDJ_EXAMPLES =
BEOS_EXAMPLES =
ifeq ($(TARGET),LINUX)
LDLIBS += -lncurses
endif
ifneq ($(USE_ALLEGRO),)
LDLIBS += $(LINK_ALLEGRO)
CFLAGS += -DTARGET_ALLEGRO
endif
EXAMPLES += $($(TARGET)_EXAMPLES)
EXES = $(addsuffix $(EXE_SUFFIX), $(EXAMPLES))
OBJS = $(addsuffix .o, $(EXAMPLES))
.PHONY: all clean cleaner veryclean
all: $(EXES)
$(EXES): $(LIBSRC)
$(OBJS): $(INCSRC)
clean:
$(RM_F) $(OBJS)
cleaner: clean
$(RM_F) $(EXES) */core
veryclean: cleaner