Skip to content

Commit

Permalink
Some minor makefile changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Samith Bysani committed Dec 24, 2008
1 parent 62096c1 commit 6584a18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions Makefile
Expand Up @@ -9,6 +9,7 @@ COPTS=-Wall -Werror -g -D_REENTRANT -lpthread
GTKOPTS=`pkg-config --cflags --libs gtk+-2.0 --libs openssl ` -lgthread-2.0

OBJS=bang-com.o bang-net.o bang-signals.o bang-module.o core.o server-preferences.o main.o
MODULES=test-module.so

MAINSRC=src/app/main.c
SPREFERENCESSRC=src/app/server-preferences.c
Expand All @@ -18,9 +19,9 @@ NETWORKSRC=src/base/bang-net.c
SIGNALSSRC=src/base/bang-signals.c
MODULESRC=src/base/bang-module.c

.PHONY: doc
.PHONY: doc modules

all: $(EXENAME) test-module.so
all: $(EXENAME) modules

$(EXENAME): $(OBJS)
$(CC) $(COPTS) $(GTKOPTS) $^ -o $(EXENAME)
Expand All @@ -46,6 +47,8 @@ bang-module.o: $(MODULESRC)
bang-net.o: $(NETWORKSRC)
$(CC) -c $(COPTS) $^

modules: $(MODULES)

test-module.so: src/modules/test-module.c
$(CC) --shared -Wl,-soname,testmodule.so $(COPTS) $^ -o test-module.so

Expand Down
4 changes: 2 additions & 2 deletions src/modules/test-module.c
Expand Up @@ -13,10 +13,10 @@ char BANG_module_name[5] = "test";
double BANG_module_version = .1;

int BANG_module_init() {
fprintf(stderr,"TEST:\t Module with name %s is initializing with version %d.\n",BANG_module_name,BANG_module_version);
fprintf(stderr,"TEST:\t Module with name %s is initializing with version %f.\n",BANG_module_name,BANG_module_version);
return 0;
}

void BANG_module_run() {
fprintf(stderr,"TEST:\t Module with name %s is running with version %d.\n",BANG_module_name,BANG_module_version);
fprintf(stderr,"TEST:\t Module with name %s is running with version %f.\n",BANG_module_name,BANG_module_version);
}

0 comments on commit 6584a18

Please sign in to comment.