diff options
author | Brian Cully <bjc@kublai.com> | 2008-07-28 18:00:48 -0400 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-07-28 18:01:24 -0400 |
commit | 50afa64fa926ffc6dc38954cf4c054bd69f52c15 (patch) | |
tree | 17e53f2ceb8e574914be57327bee2c185cf504b3 /src/Makefile | |
parent | 83e3e1a578dd36d62670284c5160d308ed4bd7c4 (diff) | |
download | mysqlerl-50afa64fa926ffc6dc38954cf4c054bd69f52c15.tar.gz mysqlerl-50afa64fa926ffc6dc38954cf4c054bd69f52c15.zip |
Clean up makefile by parameterizing the ERL and MySQL stuff a bit better.
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index a8d2020..4b479a1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,13 +1,13 @@ ERLINTERFACE = erl_interface-3.5.5.3 -MYSQLINC = /opt/local/include/mysql5/mysql -MYSQLLIB = /opt/local/lib/mysql5/mysql - -CFLAGS = -I$(MYSQLINC) \ - -I$(HOME)/lib/erlang/lib/$(ERLINTERFACE)/include \ - -O2 -g -Wall -Werror -LDFLAGS = -L$(MYSQLLIB) \ - -L$(HOME)/lib/erlang/lib/$(ERLINTERFACE)/lib \ +ERLINCS = -I$(HOME)/lib/erlang/lib/$(ERLINTERFACE)/include +ERLLIBS = -L$(HOME)/lib/erlang/lib/$(ERLINTERFACE)/lib \ -lerl_interface -lei + +MYSQLINCS = -I/opt/local/include/mysql5/mysql +MYSQLLIBS = -L/opt/local/lib/mysql5/mysql -lmysqlclient + +CFLAGS = -O2 -g -Wall -Werror $(MYSQLINCS) $(ERLINCS) +LDFLAGS = $(MYSQLLIBS) $(ERLLIBS) EFLAGS = -W +debug_info PRIVDIR = ../priv @@ -18,7 +18,6 @@ MYSQLERLOBJS = io.o log.o msg.o mysqlerl.o BEAMS = mysqlerl.beam mysqlerl_app.beam mysqlerl_connection.beam \ mysqlerl_connection_sup.beam mysqlerl_port.beam \ mysqlerl_port_sup.beam mysqlerl_sup.beam -LIBS = -lmysqlclient all: $(PRIVDIR) $(BEAMDIR) $(BINS) @@ -30,7 +29,7 @@ clean: erlc $(EFLAGS) $< $(PRIVDIR)/mysqlerl: $(PRIVDIR) $(MYSQLERLOBJS) - $(CC) -o $@ $(LDFLAGS) $(MYSQLERLOBJS) $(LIBS) + $(CC) -o $@ $(MYSQLERLOBJS) $(LDFLAGS) $(BEAMDIR)/mysqlerl.app: $(BEAMDIR) $(BEAMS) cp $(BEAMS) $(BEAMDIR) |