forked from osdba/qpipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·44 lines (31 loc) · 909 Bytes
/
Makefile
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
#############make file for tangtest###################
PLATFORM=$(shell uname)
ifeq ($(PLATFORM),Linux)
CXX=gcc -g -Wall -D_REENTRANT -D_GNU_SOURCE
MAKE=make
LIBS=-lpthread -lz -L/usr/lib
CXXFLAGS=-DLinux
endif
ifeq ($(PLATFORM),SunOS)
CXX=cc -g -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -D_GNU_SOURCE
CXXFLAGS=-DSunOS
LIBS=-lpthread -lsocket -lnsl -lz -lposix4 -ldl -lrt
endif
#application directory####
APPPATH:=$(shell pwd)
VPATH=.
INCLUDES=-I/usr/vacpp/include
ALL_OBJS=qpipe.o
#Éú³ÉÓ¦ÓÃ#
all: qpipe
qpipe:$(ALL_OBJS)
$(CXX) -o qpipe $(ALL_OBJS) $(LIBS)
clean:
rm qpipe.o;rm qpipe
#################################################################
.SUFFIXES: .c .o
.c.o:
@echo Compile file $<,`more $<|wc -l` lines ....
$(CXX) $(INCLUDES) -c $< -o $*.o
################################################################
#################makefile end################################