libver/demo/Makefile
2003-01-20 00:18:09 +00:00

47 lines
1.1 KiB
Makefile

ifdef LIBVER_SUPPORT
DEP += ../lib/ver.h
DEP_STATIC += $(DEP) ../lib/libver.a
DEP_DYNAMIC += $(DEP) ../lib/libver.so
INCLUDE += -I ../lib
LIBDIR += -L ../lib
ifeq ($(OSTYPE),linux-gnu)
LIB += -lver
else
LIB += -ldl -lver
endif
FLAG += -D_LIBVER_SUPPORT
endif
all: demo0 libdemo0_s.a libdemo0_d.so
demo0_obj.o: demo0_obj.c $(DEP) Makefile
gcc -c -g -o demo0_obj.o $(FLAG) -I . $(INCLUDE) $(LIBDIR) demo0_obj.c
libdemo0_s.o: libdemo0_s.c $(DEP) Makefile
gcc -c -g -o libdemo0_s.o $(FLAG) -I . $(INCLUDE) $(LIBDIR) libdemo0_s.c
libdemo0_s.a: libdemo0_s.o
ar -r libdemo0_s.a libdemo0_s.o
libdemo0_d.o: libdemo0_d.c $(DEP) Makefile
gcc -c -g -o libdemo0_d.o $(FLAG) -I . $(INCLUDE) $(LIBDIR) libdemo0_d.c
libdemo0_d.so: libdemo0_d.o
ld -shared -o libdemo0_d.so libdemo0_d.o
demo0: demo0.c $(DEP) demo0_obj.o libdemo0_s.a libdemo0_d.so Makefile
gcc -g -o demo0 $(FLAG) -I . $(INCLUDE) -I ../lib $(LIBDIR) -L . $(LIB) -ldemo0_d demo0.c libdemo0_s.a demo0_obj.o
clean:
rm -f demo0 demo0.o demo0_obj.o libdemo0_s.o libdemo0_s.a libdemo0_d.o libdemo0_d.so