Makefile 898 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Makefile - one file to rule them all, one file to bind them
#
# Copyright (C) 2007 Timo Teräs <timo.teras@iki.fi>
# All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it 
# under the terms of the GNU General Public License version 3 as published
# by the Free Software Foundation. See http://www.gnu.org/ for details.

TARGETS = apk

apk_OBJS = \
	state.o \
	database.o \
	package.o \
	archive.o \
	version.o \
18
	io.o \
Timo Teräs's avatar
Timo Teräs committed
19
	url.o \
20
	gunzip.o \
21 22 23 24 25 26 27
	blob.o \
	hash.o \
	md5.o \
	add.o \
	del.o \
	ver.o \
	index.o \
28
	info.o \
Cameron Banta's avatar
Cameron Banta committed
29
	search.o \
30
	fetch.o \
31
	audit.o \
32 33 34 35 36 37 38
	apk.o

ALL_OBJS = $(apk_OBJS)

all: $(TARGETS)

apk: $(apk_OBJS)
39
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
40

41 42 43
apk.static: $(apk_OBJS)
	$(CC) $(LDFLAGS) -static -o $@ $^ $(LIBS)

44 45 46 47 48 49 50
clean::
	@rm -f $(TARGETS) $(ALL_OBJS)

install::
	$(INSTALLDIR) $(DESTDIR)$(SBINDIR)
	$(INSTALL) $(TARGETS) $(DESTDIR)$(SBINDIR)