GNUmakefile 1.03 KB
Newer Older
deuce's avatar
deuce committed
1
2
3
4
SRC_ROOT = ..
# Cross platform/compiler definitions
include $(SRC_ROOT)/build/Common.gmake	# defines clean and output directory rules

deuce's avatar
deuce committed
5
6
7
CFLAGS += $(XPDEV-MT_CFLAGS) $(CIOLIB-MT_CFLAGS)

OBJS	+=	$(MTOBJODIR)$(DIRSEP)curs_cio$(OFILE)
deuce's avatar
deuce committed
8
9
10
ifdef NO_X
 CFLAGS	+=	-DNO_X
else
11
 CFLAGS	+=	-I$(X_HEADERS)
deuce's avatar
deuce committed
12
13
 OBJS	+=	$(MTOBJODIR)$(DIRSEP)console$(OFILE) \
			$(MTOBJODIR)$(DIRSEP)x_cio$(OFILE)
deuce's avatar
deuce committed
14
endif
15
16
17
ifeq ($(os),netbsd)
 CFLAGS	+=	-DN_CURSES_LIB
endif
deuce's avatar
deuce committed
18

19
20
$(MTOBJODIR)$(DIRSEP)console$(OFILE).static:
	$(QUIET)$(DELETE) $(MTOBJODIR)$(DIRSEP)console$(OFILE)*
21
	$(QUIET)touch $(MTOBJODIR)$(DIRSEP)console$(OFILE).static
22
23
24
25
26

$(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic:
	$(QUIET)$(DELETE) $(MTOBJODIR)$(DIRSEP)console$(OFILE)*
	$(QUIET)touch $(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic

deuce's avatar
deuce committed
27
# CIOLIB Library Link Rule
28
29
30
31
32
ifdef STATIC
$(CIOLIB-MT_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).static $(MTOBJODIR) $(OBJS)
else
$(CIOLIB-MT_BUILD): $(MTOBJODIR)$(DIRSEP)console$(OFILE).dynamic $(MTOBJODIR) $(OBJS)
endif
deuce's avatar
deuce committed
33
	@echo Creating $@ ...
deuce's avatar
deuce committed
34
35
	$(QUIET)$(AR) rc $@ $(OBJS)
	$(QUIET)$(RANLIB) $@