PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/bncsutil/src/bncsutil/Makefile

http://ghostcb.googlecode.com/
Makefile | 36 lines | 30 code | 6 blank | 0 comment | 0 complexity | 5c6e6cd0d5b879a67c7eddc24328a154 MD5 | raw file
 1SHELL = /bin/sh
 2SYSTEM = $(shell uname)
 3CXX = g++
 4CXXFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC
 5CXXOBJ = bsha1.o cdkeydecoder.o checkrevision.o decodekey.o file.o libinfo.o oldauth.o
 6CC = gcc
 7CCFLAGS = -Wall -O3 -I ../ -Wno-multichar -fPIC
 8CCOBJ = nls.o pe.o sha1.o stack.o
 9
10ifeq ($(SYSTEM),Darwin)
11LDFLAGS = -dynamiclib -lgmp -L/opt/local/lib
12TARGET = libbncsutil.dylib
13else
14LDFLAGS = -shared -lgmp
15TARGET = libbncsutil.so
16endif
17
18$(TARGET): $(CXXOBJ) $(CCOBJ)
19	$(CXX)  $(CXXFLAGS) $(LDFLAGS) $(CXXOBJ) $(CCOBJ) -o $(TARGET)
20
21$(CXXOBJ): %.o: %.cpp
22	$(CXX) $(CXXFLAGS) -c $< -o $@ 
23
24$(CCOBJ): %.o: %.c
25	$(CC) $(CCFLAGS) -c $< -o $@
26
27clean:
28	rm -f $(CCOBJ) $(CXXOBJ) $(TARGET) *~
29all:
30	make $(TARGET)
31
32install: $(TARGET)
33	mkdir -p /usr/include/bncsutil
34	cp *.h /usr/include/bncsutil
35	cp $(TARGET) /usr/lib
36	ldconfig