summaryrefslogtreecommitdiff
path: root/Makefile
blob: 41df4e29e32b079490e28afc8c7fd2eb126294c7 (plain)
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
50
51
52
53
CFLAGS=-Wall -Wextra -O0 -g -pipe -D_GNU_SOURCE -fdiagnostics-show-option -Wno-unused-parameter -DUNIT_PATH=\"/tmp/does/not/exist\" `pkg-config --cflags libudev dbus-1`
LIBS=-lrt -lcap `pkg-config --libs libudev dbus-1`

COMMON= \
	unit.o \
	util.o \
	set.o \
	hashmap.o \
	strv.o \
	job.o \
	manager.o \
	conf-parser.o \
	load-fragment.o \
	socket-util.o \
	log.o \
	service.o \
	automount.o \
	mount.o \
	device.o \
	target.o \
	snapshot.o \
	socket.o \
	timer.o \
	load-dropin.o \
	execute.o \
	ratelimit.o \
	dbus.o \
	dbus-manager.o \
	dbus-unit.o \
	dbus-job.o

all: systemd test-engine test-job-type systemd-logger systemctl systemadm

systemd: main.o $(COMMON)
	$(CC) $(CFLAGS) -o $@ $^  $(LIBS)

systemd-logger: logger.o $(COMMON)
	$(CC) $(CFLAGS) -o $@ $^  $(LIBS)

test-engine: test-engine.o $(COMMON)
	$(CC) $(CFLAGS) -o $@ $^  $(LIBS)

test-job-type: test-job-type.o $(COMMON)
	$(CC) $(CFLAGS) -o $@ $^  $(LIBS)

systemctl: systemctl.vala
	valac -g --save-temps systemctl.vala systemd-interfaces.vala --pkg=dbus-glib-1 --pkg=posix

systemadm: systemadm.vala
	valac -g --save-temps systemadm.vala systemd-interfaces.vala --pkg=dbus-glib-1 --pkg=posix --pkg gee-1.0 --pkg gtk+-2.0

clean:
	rm -f *.o systemd test-engine systemctl systemadm