File: Makefile

package info (click to toggle)
wmcube 0.99-pre1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 648 kB
  • ctags: 821
  • sloc: cpp: 4,479; makefile: 250; sh: 152
file content (58 lines) | stat: -rw-r--r-- 2,067 bytes parent folder | download
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
#
# wmCube 0.99-pre1
#
# To make wmcube compile on another OS change the following things:
#
# CXXFLAGS -D: FREEBSD/NETBSD/SOLARIS/OPENBSD/DARWIN
# CPUMONCC_OS: freebsd/netbsd/solaris/openbsd/darwin (you will also have
# to make sure that the makefile in the cpumoncc/$(CPUMONCC_OS) directory
# is working.
# LFLAGS: Modify/Add any necessary libraries here.
#
#
CXX= g++
CXXFLAGS=-O2 -DLINUX
CPUMONCC_OS=linux
WMCUBE_LIBS=-Lwmapp -lwmapp -Lcpumoncc/$(CPUMONCC_OS) -lcpumoncc
LFLAGS=$(WMCUBE_LIBS) -L/usr/X11R6/lib -lXpm -lXext -lX11 
OBJECTS = WmcObject.o
TARGET = wmcube

$(TARGET): wmcube.cc cpumoncc/$(CPUMONCC_OS)/libcpumoncc.a wmapp/libwmapp.a $(OBJECTS)
	@@echo "###############################################################"
	@@echo "#"
	@@echo "# I am now building the actual wmCube application."
	@@echo "#" 
	@@echo "###############################################################"
	$(CXX) $(CXXFLAGS) $(OBJECTS) $< -o $@ $(LFLAGS)

cpumoncc/$(CPUMONCC_OS)/libcpumoncc.a:
	@@echo "###############################################################"
	@@echo "# I am now building the cpumoncc library in 'cpumoncc/$(CPUMONCC_OS)'."
	@@echo "# Please modify/verify the makefile in that directory before"
	@@echo "# reporting an error as a bug."
	@@echo "###############################################################"
	cd cpumoncc/$(CPUMONCC_OS); make; cd ../..
	
wmapp/libwmapp.a:
	@@echo "###############################################################"
	@@echo "# I am now building the wmapp library in 'wmapp'"
	@@echo "# Please modify/verify the makefile in that directory before"
	@@echo "# reporting an error as a bug."
	@@echo "###############################################################"
	cd wmapp; make; cd ..

install: $(TARGET)
	cp -Rf wmc /usr/share/wmcube
	cp wmcube /usr/local/bin
	chmod 755 /usr/local/bin/wmcube
        chown root:root /usr/local/bin/wmcube

clean:
	rm -f *.o *\~ $(TARGET)
	cd wmapp; make clean; cd ..
	cd cpumoncc/$(CPUMONCC_OS); make clean; cd ../..
	
install_clean:
	rm -fr /usr/share/wmcube
	rm /usr/local/bin/wmcube