2003-01-20 01:18:09 +01:00
|
|
|
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
|
|
|
|
|
2003-01-23 01:19:42 +01:00
|
|
|
FLAG += -D_LIBVER_SUPPORT -rdynamic
|
2003-01-20 01:18:09 +01:00
|
|
|
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
|