2008-11-28 20:17:45 +03:00
|
|
|
# Makefile for CSS test code
|
|
|
|
|
|
|
|
AR := ar
|
|
|
|
CC := gcc
|
|
|
|
LD := gcc
|
|
|
|
|
|
|
|
CFLAGS := -O2 -I.. -I/usr/include/libxml2 -std=c99
|
|
|
|
LDFLAGS := -lxml2 -lz -lcurl
|
|
|
|
|
|
|
|
LIBOBJS := css.o css_enum.o parser.o ruleset.o scanner.o \
|
|
|
|
messages.o hashtable.o talloc.o url.o utils.o
|
|
|
|
|
2008-11-28 20:29:35 +03:00
|
|
|
.PHONY: default lib clean
|
|
|
|
|
|
|
|
default:
|
|
|
|
$(error "You probably wanted 'make test'")
|
|
|
|
|
2008-11-28 20:17:45 +03:00
|
|
|
test: lib testcss.o
|
2008-11-28 20:29:35 +03:00
|
|
|
$(LD) -o $@ testcss.o $(LDFLAGS) -L. -lnscss
|
2008-11-28 20:17:45 +03:00
|
|
|
|
|
|
|
lib: $(LIBOBJS)
|
2008-11-28 20:29:35 +03:00
|
|
|
$(AR) -cru libnscss.a $^
|
2008-11-28 20:17:45 +03:00
|
|
|
|
|
|
|
clean:
|
2008-11-28 20:29:35 +03:00
|
|
|
$(RM) $(LIBOBJS) testcss.o test libnscss.a
|
2008-11-28 20:17:45 +03:00
|
|
|
|
|
|
|
messages.o: ../utils/messages.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
hashtable.o: ../utils/hashtable.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
talloc.o: ../utils/talloc.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
url.o: ../utils/url.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
utils.o: ../utils/utils.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|