summaryrefslogtreecommitdiff
path: root/Makefile
blob: eb33d56e8a5736f47dba95c78c8317bd0687e6f6 (plain)
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
.POSIX:
.DEFAULT:;$(MAKE) all

ARCHITECTURE=x86
WORDSIZE=
SRCDIR=./src
INCDIR=./include
OBJDIR=/home/jkk/c/obj

CC=c99
CFLAGS=-D_XOPEN_SOURCE=700

all: .deps.mk include
	@mkdir -p $(OBJDIR)
	$(MAKE) -f .deps.mk 

deps: .headers.mk .deps.mk

.deps.mk: mk.sh
	sh -c '. ./mk.sh; make_deps_mk'

.headers.mk: mk.sh
	sh -c '. ./mk.sh; make_headers_mk'

headers include: .headers.mk mkh.sh
	$(MAKE) -f .headers.mk headers

ctags:
	ctags $$(find src -name \*.c)

clean:
	rm -rf $(OBJDIR) *.a

extra-clean: clean
	rm -rf .deps .*.mk $(INCDIR)