head	1.5;
access;
symbols
	project:1.1.1
	start:1.1.1.2
	vendor:1.1.1;
locks; strict;
comment	@# @;


1.5
date	2008.01.18.18.50.43;	author bando;	state Exp;
branches;
next	1.4;

1.4
date	2008.01.07.13.17.49;	author bando;	state Exp;
branches;
next	1.3;

1.3
date	2008.01.07.13.14.58;	author bando;	state Exp;
branches;
next	1.2;

1.2
date	2008.01.06.16.50.28;	author bando;	state dead;
branches;
next	1.1;

1.1
date	2008.01.06.16.14.08;	author bando;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2008.01.06.16.14.08;	author bando;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2008.01.07.13.02.44;	author bando;	state Exp;
branches;
next	;


desc
@@


1.5
log
@Add language auto choice compile
@
text
@# Author : YoungJoo-Kim <bando@@bando.org>
# $Id: Makefile,v 1.4 2008/01/07 13:17:49 bando Exp $

GCC = gcc
TARGET = cdic
SRC = cdic.c
OBJ = $(SRC:%.c=%.o)
CFLAGS = -Wall -g -O2
LIB =
INC =
DEF = -DHAVE_ICONV
INSTALL= install -c
INSTALL_DIR = /usr/bin
ifeq ($(LANG), ko_KR.UTF-8)
SRC = cdic.utf8.c
DEF += -DHAVE_UTF8
endif

.SUFFIXES: .c
%.o: %.c
	$(GCC) $(CFLAGS) $(DEF) $(INC) -c $< -o $@@

all: $(TARGET)
$(TARGET): $(OBJ)
	$(GCC) -o $@@ $(OBJ) $(LIB)

clean:
	rm -f *.o $(TARGET)

install: $(TARGET)

	@@if [ ! -f "$(TARGET)" ] ; then\
		echo "ERROR : $(TARGET) Not found! Compile normally?";\
		exit 1;\
	fi

	@@if [ -w $(INSTALL_DIR) ] ; then\
		$(INSTALL) -m 755 $(TARGET) $(INSTALL_DIR)/$(TARGET);\
		printf "INSTALL FILE : $(INSTALL_DIR)/$(TARGET) : [\033[32m OK \033[0m]\n";\
	else \
		printf "INSTALL FILE : $(INSTALL_DIR)/$(TARGET) :  [\033[31m Permission Denied \033[0m]\n";\
	fi


@


1.4
log
@Release 1.1
@
text
@d2 1
a2 1
# $Id: $
d14 4
d21 1
a21 1
	$(GCC) $(CFLAGS) $(DEF) $(INC) -g -c $< -o $@@
d30 1
a30 1
install:
d33 1
a33 1
		echo "$(TARGET) : make   ּ!";\
@


1.3
log
@Release 1.0
@
text
@d4 9
a12 9
GCC=gcc
TARGET=cdic
SRC= cdic.c
OBJ= $(SRC:%.c=%.o)
CFLAGS= -Wall -g -O2
LIB=
INC=
DEF=
INSTALL = install -c
@


1.2
log
@*** empty log message ***
@
text
@d2 1
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Release 1.0
@
text
@@


1.1.1.2
log
@Release 1.0
@
text
@a1 1
# $Id: $
@

