Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
warden: Move tool to separate dir and fix build process
Browse files Browse the repository at this point in the history
Change-Id: I2fd62cd14ce6779d2416765b446daf732d02470a
  • Loading branch information
pietern committed Feb 17, 2012
1 parent 3eb9b93 commit 652d849
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion warden/lib/warden/container/features/mem_limit.rb
Expand Up @@ -20,7 +20,7 @@ class OomNotifier
def initialize(container)
@container = container

oom_notifier_path = File.expand_path("../../../../../src/oom", __FILE__)
oom_notifier_path = File.expand_path("../../../../../src/oom/oom", __FILE__)
@child = DeferredChild.new(oom_notifier_path, container.cgroup_root_path)

# Zero exit status means a process OOMed, non-zero means an error occurred
Expand Down
3 changes: 0 additions & 3 deletions warden/src/.gitignore

This file was deleted.

29 changes: 6 additions & 23 deletions warden/src/Makefile
@@ -1,25 +1,8 @@
OPTIMIZATION?=-O0
DEBUG?=-g -ggdb -rdynamic
BINS=report_quota runner clone
default: all

all: $(BINS)
# Proxy any target to the Makefiles in the per-tool directories
%:
cd clone && $(MAKE) $@
cd oom && $(MAKE) $@

clean:
rm -f *.o $(BINS)

.PHONY: all clean

report_quota: report_quota.o
$(CC) -o $@ $^

runner: runner.o
$(CC) -o $@ $^

clone: clone.o
$(CC) -o $@ -lutil $^

oom: oom.o
$(CC) -o $@ $^

%.o: %.c
$(CC) -c -Wall -D_GNU_SOURCE $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $<
.PHONY: default
1 change: 1 addition & 0 deletions warden/src/clone/.gitignore
@@ -1 +1,2 @@
clone
*.o
2 changes: 2 additions & 0 deletions warden/src/oom/.gitignore
@@ -0,0 +1,2 @@
oom
*.o
15 changes: 15 additions & 0 deletions warden/src/oom/Makefile
@@ -0,0 +1,15 @@
OPTIMIZATION?=-O0
DEBUG?=-g -ggdb -rdynamic

all: oom

clean:
rm -f *.o oom

.PHONY: all clean

oom: oom.o
$(CC) -o $@ -lutil $^

%.o: %.c
$(CC) -c -Wall -D_GNU_SOURCE $(OPTIMIZATION) $(DEBUG) $(CFLAGS) $<
File renamed without changes.

0 comments on commit 652d849

Please sign in to comment.