File: makefile.in

package info (click to toggle)
udpkg 1.19
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 124 kB
  • sloc: ansic: 1,127; sh: 154; makefile: 38
file content (34 lines) | stat: -rw-r--r-- 815 bytes parent folder | download | duplicates (3)
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
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

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

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

all: $(BIN)

# Size optimized and stripped binary target.
small: CFLAGS += -Os -fomit-frame-pointer
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
	-rm -rf autom4te.cache

*.o: udpkg.h