cf93b33613
Change-Id: Ib69aac4e7510c99398130467b7fe0f10fc4897f7
23 lines
395 B
Makefile
23 lines
395 B
Makefile
CC?=gcc
|
|
CXX?=g++
|
|
AR?=ar
|
|
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:
|
|
rm -rf $(OBJ) $(LIB)
|