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