summaryrefslogtreecommitdiff
path: root/core/opiealarm/Makefile
blob: 255083da8672540f175fe0ab4c3bc4bef336de34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

DESTDIR=$(OPIEDIR)/bin

CROSS:=arm-linux-
CC   :=$(CROSS)gcc
LD   :=$(CROSS)gcc
STRIP:=$(CROSS)strip

CFLAGS:=-O2
LDFLAGS:=

all: $(DESTDIR)/opiealarm

$(DESTDIR)/opiealarm: opiealarm.c
	$(CC) $(CFLAGS) opiealarm.c -o $(DESTDIR)/opiealarm $(LDFLAGS)
	$(STRIP) --strip-all $(DESTDIR)/opiealarm
	chmod u+s $(DESTDIR)/opiealarm
	chown root $(DESTDIR)/opiealarm 2>/dev/null || echo -e "\nopiealarm must be owned by root to work correctly.\n"

clean:
	-rm -f *~ core