File: makefile

package info (click to toggle)
snappea 3.0d3-20.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 5,896 kB
  • ctags: 3,582
  • sloc: ansic: 33,469; sh: 8,293; python: 7,623; makefile: 240
file content (46 lines) | stat: -rw-r--r-- 1,305 bytes parent folder | download | duplicates (8)
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
#	Where is the SnapPea kernel source code on your computer?
SNAPPEA_KERNEL = /home/jeff/SnapPea/kernel

#	Where is Python.h on your computer?
#	If you don't know, try typing "locate Python.h"
#	(without the quotation marks) at the shell prompt.
PYTHON_DIRECTORY = /usr/include/python1.5

#	Compiler options.
#		-g	debugging code
#		-O	optimize
CFLAGS = -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 

#	This tells the compiler where to look for the header files.
HEADER_PATH =	-I$(SNAPPEA_KERNEL)/headers/	\
				-I$(SNAPPEA_KERNEL)/unix_kit/	\
				-I$(PYTHON_DIRECTORY)


SnapPeaC.so:	SnapPeaC.o KernelObjects/BuildDate

	gcc -shared -o SnapPeaC.so $(CFLAGS)	\
		SnapPeaC.o							\
		KernelObjects/*.o					\
		-lm
	
SnapPeaC.o: SnapPeaC.c
	gcc -c $(CFLAGS) $(HEADER_PATH) SnapPeaC.c

KernelObjects/BuildDate:	$(SNAPPEA_KERNEL)/code/*.c		\
							$(SNAPPEA_KERNEL)/headers/*.h	\
							$(SNAPPEA_KERNEL)/unix_kit/*

	mkdir -p KernelObjects
	cd KernelObjects;									\
	gcc -c $(CFLAGS) $(HEADER_PATH)						\
		$(SNAPPEA_KERNEL)/code/*.c						\
		$(SNAPPEA_KERNEL)/unix_kit/unix_UI.c			\
		$(SNAPPEA_KERNEL)/unix_kit/unix_cusped_census.c	\
		$(SNAPPEA_KERNEL)/unix_kit/unix_file_io.c
	date > KernelObjects/BuildDate

clean:
	rm -f  SnapPeaC.o
	rm -rf KernelObjects
	rm -f  *.pyc