-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_local_test
43 lines (32 loc) · 931 Bytes
/
make_local_test
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
CC = gcc
LD = ld
INCLUDES = -I/usr/include
CFLAGS = -g -Wall -O0
LDFLAGS =
dir_guard=@mkdir -p $(@D)
outputfolder=build_$(shell arch)
EXE = $(outputfolder)/psup
FOLDERS=$(outputfolder)
OBJ = ${EXE}.o \
$(outputfolder)/directory_watcher.o \
$(outputfolder)/program_watcher.o \
$(outputfolder)/process_helper.o
CSRC = src/*.c
CHEAD = src/*.h
all: $(EXE) $(CSRC) $(OBJ)
clean:
rm -rf $(outputfolder) *.o *~ core
$(EXE): $(OBJ)
$(CC) $(CFLAGS) $(OBJ) $(LDFLAGS) -o $@
$(outputfolder)/program_watcher.o: src/program_watcher.c
$(dir_guard)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(outputfolder)/directory_watcher.o: src/directory_watcher.c
$(dir_guard)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(outputfolder)/process_helper.o: src/process_helper.c src/process_helper.h
$(dir_guard)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
$(outputfolder)/psup.o: src/psup.c
$(dir_guard)
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@