-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.82 KB
/
Makefile
File metadata and controls
67 lines (52 loc) · 1.82 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# NetCI Root Makefile
# Run 'make' or 'make debug' from the root directory
#
# This Makefile automatically:
# - Generates src/autoconf.h if missing (required for compilation)
# - Builds the NetCI engine in src/
# - Moves the binary to the root directory
# - Creates std.db if needed
CC=cc
CCFLAGS=-ansi
DEFS=
all: netci
netci: debug
netci.ini:
cp src/netci.ini .
release: src/release.bld src/netci netci.ini std.db version
debug: src/debug.bld src/netci netci.ini std.db version
src/autoconf.h: src/autoconf.c
@echo "Generating autoconf.h..."
$(CC) $(CCFLAGS) $(DEFS) src/autoconf.c -o src/autoconf
cd src && ./autoconf
@echo "autoconf.h generated successfully"
src/release.bld: src/autoconf.h
@if [ -f src/debug.bld ] ; then rm -f src/debug.bld ; fi
@if [ ! -f src/autoconf.h ] ; then $(MAKE) src/autoconf.h ; fi
touch src/release.bld
src/debug.bld: src/autoconf.h
@if [ -f src/release.bld ] ; then rm -f src/release.bld ; fi
@if [ ! -f src/autoconf.h ] ; then $(MAKE) src/autoconf.h ; fi
touch src/debug.bld
src/netci: src/autoconf.h
cd src && $(MAKE) netci
mv src/netci .
std.db:
./netci -create -noisy -save=std.db
version:
./netci -version
clean:
@if [ -f netci ] ; then rm -f netci ; fi
@if [ -f gmon.out ] ; then rm -f gmon.out ; fi
@if [ -f src/autoconf.h ] ; then rm -f src/autoconf.h ; fi
@if [ -f src/autoconf ] ; then rm -f src/autoconf ; fi
@if [ -f src/release.bld ] ; then rm -f src/release.bld ; fi
@if [ -f src/debug.bld ] ; then rm -f src/debug.bld ; fi
@touch src/dummy.o
@rm -f src/*.o
spotless: clean
@if [ -f netci.ini ] ; then rm -f netci.ini ; fi
@if [ -f syslog.txt ] ; then rm -f syslog.txt ; fi
@if [ -f std.db ] ; then rm -f std.db ; fi
@if [ -f libs/ci200fs/etc/pkg/packages.lst ] ; then rm -f libs/ci200fs/etc/pkg/packages.lst ; fi
.PHONY: all netci release debug version clean spotless