File: makefile.in

package info (click to toggle)
udpkg 1.00
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 144 kB
  • ctags: 97
  • sloc: ansic: 907; sh: 152; makefile: 59
file content (31 lines) | stat: -rw-r--r-- 653 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
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

CC=@CC@
CFLAGS=@CFLAGS@ -D_GNU_SOURCE -DADMINDIR=\"@ADMINDIR@\" -DARCH_TEXT='"$(DEB_HOST_ARCH)"'
OBJS=$(subst .c,.o,$(wildcard *.c))
BIN=udpkg
BUSYBOX=@BUSYBOXDIR@
LIBS=-ldebian-installer

ifdef DEBUG
CFLAGS:=$(CFLAGS) -DDODEBUG
endif

all: $(BIN)

# Size optimized and stripped binary target.
small: CFLAGS += -Os
small: clean $(BIN)
	strip --remove-section=.comment --remove-section=.note $(BIN)
	ls -l $(BIN)

$(BIN): $(OBJS)
	$(CC) -o $(BIN) $(OBJS) $(LIBS)

clean:
	-rm -f $(BIN) $(OBJS) *~

distclean: clean
	-rm -f config.status config.log config.cache makefile config.h

*.o: udpkg.h