Automatic creation of building directories during make (OK for version >= 0.8)

This commit is contained in:
Yannick Verschueren 2004-02-13 10:04:37 +00:00
parent 9bf97dc1d0
commit e4dafe5aa2
1 changed files with 6 additions and 4 deletions

View File

@ -19,14 +19,14 @@ ifdef MINGW32
OBJ_DIR = $(OBJ_DIR_W32)
LIB_DIR = $(LIB_DIR_W32)
all: $(OBJ_DIR) $(LIB_DIR) \
$(LIB_DIR)/libopenjpeg.a $(LIB_DIR)/libopenjpeg.dll
$(LIB_DIR)/libopenjpeg.a $(LIB_DIR)/libopenjpeg.dll
else
CC = gcc
AR = ar
OBJ_DIR = obj
LIB_DIR = lib
all: $(OBJ_DIR) $(LIB_DIR) \
$(LIB_DIR)/libopenjpeg.a $(LIB_DIR)/libopenjpeg.so
$(LIB_DIR)/libopenjpeg.a $(LIB_DIR)/libopenjpeg.so
endif
$(OBJ_DIR):
@ -46,19 +46,21 @@ $(OBJ_DIR)/int.o: int.c
$(OBJ_DIR)/j2k.o: j2k.c j2k.h cio.h tcd.h dwt.h int.h
$(OBJ_DIR)/mct.o: mct.c mct.h fix.h
$(OBJ_DIR)/mqc.o: mqc.c mqc.h
$(OBJ_DIR)/pi.o: pi.c pi.h int.h
$(OBJ_DIR)/raw.o: raw.c raw.h
$(OBJ_DIR)/t1.o: t1.c t1.h j2k.h mqc.h raw.h int.h mct.h dwt.h fix.h
$(OBJ_DIR)/t2.o: t2.c t2.h tcd.h bio.h j2k.h pi.h tgt.h int.h cio.h
$(OBJ_DIR)/tcd.o: tcd.c tcd.h int.h t1.h t2.h dwt.h mct.h
$(OBJ_DIR)/tgt.o: tgt.c tgt.h bio.h
$(OBJ_DIR)/jpt.o: jpt.c jpt.h cio.h
COM_OBJS = $(addprefix $(OBJ_DIR)/, j2k.o bio.o cio.o dwt.o fix.o int.o mct.o \
mqc.o pi.o t1.o t2.o tgt.o tcd.o raw.o)
mqc.o pi.o t1.o t2.o tgt.o tcd.o raw.o jpt.o)
$(LIB_DIR)/libopenjpeg.a: ${COM_OBJS}
$(AR) -sr $@ $^
$(LIB_DIR)/libopenjpeg.dll: ${COM_OBJS}
${CC} -s -shared -Wl,-soname,libopenjpeg.dll -o $@ $^