#
# makefile
#
CC = g++
TARGET = xtranscode
TARGET2 = prsmng
TARGET3 = mntmng
BINDIR = ../../bin
#BINDIR = .
LIBDIR = ../../lib
COMM = ../comm
#-L$(COMM) -lmygun
LIBS = \
-lnsl -lpthread
OFLAGS = -g -Wall -O6 -march=pentiumpro
EXTRA_FLAGS += -DDEBUG=1
#
# if unix add -lsocket
# if linux remove -lsocket
#
OFILES=\
xtrans.o \
comm.o
OFILES2=\
prsmng.o \
comm.o
OFILES3=\
mntmng.o \
comm.o
CFLAGS=\
$(EXTRA_FLAGS) \
$(OFIAGS) \
-I.
all: $(TARGET) $(TARGET2) $(TARGET3)
$(TARGET): $(OFILES)
$(CC) -o $(BINDIR)/$(TARGET) $(CFLAGS) $(OFILES) $(LIBS)
$(TARGET2): $(OFILES2)
$(CC) -o $(BINDIR)/$(TARGET2) $(CFLAGS) $(OFILES2) $(LIBS)
$(TARGET3): $(OFILES3)
$(CC) -o $(BINDIR)/$(TARGET3) $(CFLAGS) $(OFILES3) $(LIBS)
xtrans.o: xtrans.cpp
$(CC) -c xtrans.cpp $(CFLAGS)
comm.o: comm.cpp
$(CC) -c comm.cpp $(CFLAGS)
prsmng.o: prsmng.cpp
$(CC) -c prsmng.cpp $(CFLAGS)
mntmng.o: mntmng.cpp
$(CC) -c mntmng.cpp $(CFLAGS)
clean:
rm -f ./*.o
rm -f $(BINDIR)/$(TARGET)
rm -f $(BINDIR)/$(TARGET2)
rm -f $(BINDIR)/$(TARGET3)
'UNIX_LINUX_C_C++' 카테고리의 다른 글
CC 및 GCC 컴파일러 설치와 환경 설정 (0) | 2011.10.16 |
---|---|
[FreeTDS] FreeTDS를 이용한 UNIX에서 ODBC(MSSQL)이용하기 (0) | 2011.10.16 |
gcc 컴파일시 malloc() 함수 warning (0) | 2011.10.16 |
token 함수를 만들어서 사용해보자 (0) | 2011.10.16 |
구조체, 배열, 포인트변수 설명 (0) | 2011.10.16 |