~ctwm/ctwm/trunk

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
45
46
47
48
49
50
51
# Defs
TOOLS=${RTDIR}/tools

CC?=cc
YACC?=yacc
YACC_FLAGS?=-d -b gram
YACC_CMD?=${YACC} ${YACC_FLAGS}
FLEX?=flex

C99FLAG?=-std=c99   # Most gcc-like compilers
#C99FLAG=-xc99      # Sun Studio

# Basic flags for build and pulling in X
_CFLAGS=${C99FLAG} -O -I${RTDIR} -I${RTDIR}/ext -I${BDIR} -I/usr/local/include
_LFLAGS=-L/usr/local/lib -lSM -lICE -lX11 -lXext -lXmu -lXt

# glibc headers desire these when in C99 mode
#_CFLAGS+=-D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_GNU_SOURCE

# And BSD headers, if you enable the above, need this
#_CFLAGS+=-D__BSD_VISIBLE

# Solaris b0rkedness needs this for gethostbyname
#_LFLAGS+=-lnsl
# and for asprintf declaration, if you set the glibc flags
#_CFLAGS+=-D__EXTENSIONS__



# $CFLAGS is a standard place to set or pass compiler flags, so put that
# on the end of our flags, and finalize 'em.
_CFLAGS+=${CFLAGS}



# Default target
all: ${BDIR} ctwm

# Build dir
${BDIR}:
	mkdir -p ${BDIR}

clean:
	rm -rf ${BDIR} ctwm

allclean: clean
	rm -f Makefile*

gen: ${BDIR}
GENSRC=
GENXTRA=