2014-05-01 16:21:08 +00:00
|
|
|
CC?=gcc
|
|
|
|
CXX?=g++
|
|
|
|
AR?=ar
|
2013-06-12 23:50:14 +00:00
|
|
|
CFLAGS=-Wall -O2 `xml2-config --cflags` -std=c99 -g -fPIC
|
|
|
|
CXXFLAGS=-Wall -O2 `xml2-config --cflags` -g -fPIC
|
|
|
|
LIB=libsocdesc.a
|
|
|
|
SRC=$(wildcard *.c)
|
|
|
|
SRCXX=$(wildcard *.cpp)
|
|
|
|
OBJ=$(SRC:.c=.o) $(SRCXX:.cpp=.o)
|
|
|
|
|
|
|
|
all: $(LIB) $(EXEC)
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
$(LIB): $(OBJ)
|
|
|
|
$(AR) rcs $@ $^
|
|
|
|
|
|
|
|
clean:
|
2014-05-01 16:21:08 +00:00
|
|
|
rm -rf $(OBJ) $(LIB)
|