Also test Objective-C binaries

This commit is contained in:
Pierre Pronchery 2015-05-07 23:38:44 +02:00
parent dbff1f96c1
commit ad989c6489
4 changed files with 42 additions and 7 deletions

View File

@ -1,4 +1,4 @@
TARGETS = $(OBJDIR)test
TARGETS = $(OBJDIR)test $(OBJDIR)test2
OBJDIR =
PREFIX = /usr/local
DESTDIR =
@ -19,14 +19,24 @@ test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
$(OBJDIR)test: $(test_OBJS)
$(CC) -o $(OBJDIR)test $(test_OBJS) $(test_LDFLAGS)
test2_OBJS = $(OBJDIR)test.o
test2_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test2_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) -lobjc
$(OBJDIR)test2: $(test2_OBJS)
$(CC) -o $(OBJDIR)test2 $(test2_OBJS) $(test2_LDFLAGS)
$(OBJDIR)test.o: test.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)test.o -c test.c
$(OBJDIR)main.o: main.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)main.o -c main.c
$(OBJDIR)test.o: test.m
$(CC) $(test2_CFLAGS) -o $(OBJDIR)test.o -c test.m
clean:
$(RM) -- $(test_OBJS)
$(RM) -- $(test_OBJS) $(test2_OBJS)
distclean: clean
$(RM) -- $(TARGETS)

View File

@ -1,4 +1,4 @@
TARGETS = $(OBJDIR)test
TARGETS = $(OBJDIR)test $(OBJDIR)test2
OBJDIR =
PREFIX = /usr/local
DESTDIR =
@ -19,14 +19,24 @@ test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
$(OBJDIR)test: $(test_OBJS)
$(CC) -o $(OBJDIR)test $(test_OBJS) $(test_LDFLAGS)
test2_OBJS = $(OBJDIR)test.o
test2_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test2_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) -lobjc
$(OBJDIR)test2: $(test2_OBJS)
$(CC) -o $(OBJDIR)test2 $(test2_OBJS) $(test2_LDFLAGS)
$(OBJDIR)test.o: test.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)test.o -c test.c
$(OBJDIR)main.o: main.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)main.o -c main.c
$(OBJDIR)test.o: test.m
$(CC) $(test2_CFLAGS) -o $(OBJDIR)test.o -c test.m
clean:
$(RM) -- $(test_OBJS)
$(RM) -- $(test_OBJS) $(test2_OBJS)
distclean: clean
$(RM) -- $(TARGETS)

View File

@ -1,4 +1,4 @@
TARGETS = $(OBJDIR)test$(EXEEXT)
TARGETS = $(OBJDIR)test$(EXEEXT) $(OBJDIR)test2$(EXEEXT)
OBJDIR =
PREFIX = /usr/local
DESTDIR =
@ -20,14 +20,24 @@ test_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
$(OBJDIR)test$(EXEEXT): $(test_OBJS)
$(CC) -o $(OBJDIR)test$(EXEEXT) $(test_OBJS) $(test_LDFLAGS)
test2_OBJS = $(OBJDIR)test.o
test2_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
test2_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) -lobjc
$(OBJDIR)test2$(EXEEXT): $(test2_OBJS)
$(CC) -o $(OBJDIR)test2$(EXEEXT) $(test2_OBJS) $(test2_LDFLAGS)
$(OBJDIR)test.o: test.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)test.o -c test.c
$(OBJDIR)main.o: main.c
$(CC) $(test_CFLAGS) -o $(OBJDIR)main.o -c main.c
$(OBJDIR)test.o: test.m
$(CC) $(test2_CFLAGS) -o $(OBJDIR)test.o -c test.m
clean:
$(RM) -- $(test_OBJS)
$(RM) -- $(test_OBJS) $(test2_OBJS)
distclean: clean
$(RM) -- $(TARGETS)

View File

@ -1,7 +1,12 @@
targets=test
targets=test,test2
dist=Makefile
[test]
type=binary
sources=test.c,main.c
install=$(BINDIR)
[test2]
type=binary
sources=test.m
ldflags=-lobjc