rockbox/utils/regtools/lib/Makefile
Amaury Pouly cf93b33613 regtools: fix makefiles
Change-Id: Ib69aac4e7510c99398130467b7fe0f10fc4897f7
2014-05-01 19:34:58 +02:00

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)