-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.in
49 lines (38 loc) · 1.18 KB
/
Makefile.in
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
CC := @CC@
INSTALL := @INSTALL@
BINDIR := @prefix@/@bindir@
SBINDIR := @prefix@/@sbindir@
MANDIR := @prefix@/@mandir@
LIBDIR := @prefix@/@libdir@
GLIB_INC := $(shell glib-config --cflags)
GLIB_LIB := $(shell glib-config --libs)
default: all
# Include the various module definitions
include src/Makefile.inc
# Look for include files in each of the modules (FIXME: this is a hack!)
CFLAGS = @CFLAGS@
#LDFLAGS = @LDFLAGS@ @LIBS@
#CFLAGS += -I src
# Include the C include Deps
#TEMP := $(foreach tmp,$(PROJ),$($(tmp)_OBJ))
#DEPS := $(TEMP:.o=.d)
#include $(DEPS)
all: $(foreach tmp,$(PROJ),$($(tmp)_BIN))
# Build files with project-specific CFLAGS
%.o: %.c
$(CC) $(CFLAGS) $(yavipind_CFLAGS) -c $< -o $@
# Calculate C include deps
%.d: %.c
scripts/depend.sh $(CFLAGS) $< > $@
# Special clean rule to let projects specify their own cleanup
clean: $(foreach tmp,$(PROJ),$(tmp)_clean)
rm -f $(DEPS)
distclean: clean
rm -f config.cache config.log config.status include/autoconf.h \
Makefile $(foreach tmp,$(PROJ),$($(tmp)_DIR)/Makefile.inc)
# Likewise for install
.PHONY: install clean
pre-install:
mkdir -p $(BINDIR)
mkdir -p $(MANDIR)/man8
install: pre-install $(foreach tmp,$(PROJ),$(tmp)_install)