Commit | Line | Data |
---|---|---|
2ee56a4f AT |
1 | ################################################################################ |
2 | # Configuration | |
3 | ################################################################################ | |
4 | ||
5 | # The below settings work on FreeBSD. Other UNIX-like systems should only | |
6 | # require minor tweaks (e.g. LIB_PATH on Debian should be /usr/lib/ rather than | |
7 | # /usr/local/lib/ and the compiler is gcc rather than cc). | |
8 | CC = cc | |
9 | CC_FLAGS = -Wall -pedantic | |
10 | INC_PATH = -I../screenhack/ -I/usr/local/include/ | |
11 | LIB_PATH = -L/usr/local/lib/ | |
12 | LIBS = -lm -lX11 -lXt | |
13 | ||
14 | # These flags are normally set in config.h which is generated by the autoconf | |
15 | # script as the initial step of the xscreensaver build process. The flags | |
16 | # enable/disable code in the various screenhack library files. When compiling | |
17 | # elsewhere than FreeBSD, these flags will likely need to be changed. If | |
18 | # you're having trouble determing the correct flags to use, try running | |
19 | # './configure' in an xscreensaver source tree and examining the generated | |
20 | # config.h file. | |
21 | DEFINES = -DGETTIMEOFDAY_TWO_ARGS -DHAVE_UNISTD_H | |
22 | ||
23 | # Since we're only building standalone hacks (i.e. building outside the | |
24 | # xscreensaver tree/process) for testing and will later integrate them into the | |
25 | # xscreensaver source tree, for now we simply slurp up all the C files that | |
26 | # comprise the screenhack library and link them directly into the binary. | |
27 | SCREENHACK_SRC != ls -1 ../screenhack/*.c | |
28 | ||
29 | ################################################################################ | |
30 | # Targets | |
31 | ################################################################################ | |
32 | ||
33 | all: | |
34 | @$(CC) $(CC_FLAGS) $(DEFINES) $(INC_PATH) $(LIB_PATH) $(LIBS) -o greynetic greynetic.c $(SCREENHACK_SRC) | |
35 | ||
36 | clean: | |
37 | @rm -f greynetic greynetic.core | |
38 | ||
39 | run: clean all | |
40 | @echo "" | |
41 | @echo "######################" | |
42 | @echo "# Press 'q' to exit. #" | |
43 | @echo "######################" | |
44 | @echo "" | |
45 | @./greynetic | |
46 | ||
47 | manpage: | |
48 | @mandoc -a greynetic.man |