File: Makefile

package info (click to toggle)
apt-build 0.12.27
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 348 kB
  • ctags: 73
  • sloc: perl: 671; ansic: 159; sh: 145; makefile: 88
file content (35 lines) | stat: -rw-r--r-- 972 bytes parent folder | download
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
# $Id: Makefile 2 2006-02-15 21:26:29Z acid $

APT_BUILD = apt-build
APT_BUILD_WRAPPER = apt-build-wrapper
WRAP_PROGRAMMS = gcc cc g++ c++ make
CFLAGS = -W -Wall -D_GNU_SOURCE -g
INSTALL = install
LN_S = ln -s
BINDIR = $(DESTDIR)/usr/bin
APT_BUILD_DIR = $(DESTDIR)/usr/lib/apt-build
HOST_TYPE = 

all: $(APT_BUILD_WRAPPER)
	$(MAKE) -C man/

$(APT_BUILD_WRAPPER): wrapper.c config.o
	$(CC) $(CFLAGS) -o $@ $^

install:	$(APT_BUILD_WRAPPER) $(APT_BUILD)
	$(INSTALL) -g 0 -o 0 -d $(BINDIR)
	$(INSTALL) -g 0 -o 0 -m 755 $(APT_BUILD) $(BINDIR)
	$(INSTALL) -g 0 -o 0 -d $(APT_BUILD_DIR)
	$(INSTALL) -g 0 -o 0 -m 755 $(APT_BUILD_WRAPPER) $(APT_BUILD_DIR)
	for prog in $(WRAP_PROGRAMMS); do \
		$(LN_S) $(APT_BUILD_WRAPPER) $(APT_BUILD_DIR)/$$prog; \
	done
ifneq ($(HOST_TYPE),)
	for prog in gcc g++; do \
		$(LN_S) $(APT_BUILD_WRAPPER) $(APT_BUILD_DIR)/$$prog-$(HOST_TYPE); \
	done
endif

clean:
	rm -f *.o $(APT_BUILD_WRAPPER) cc.wrapper.c make.wrapper.c
	$(MAKE) -C man/ clean