Skip to content

Commit

Permalink
Fix makefile for x3core.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhcad committed Nov 10, 2011
1 parent b151fc4 commit a7a7e81
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
8 changes: 4 additions & 4 deletions code/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ pkg_Example:
# @echo Making all in subdirectory $@...
# $(MAKE) -C pkg_UnitTest

pkg_Platform:
@echo
@echo Making all in subdirectory $@...
$(MAKE) -C pkg_Platform
#pkg_Platform:
# @echo
# @echo Making all in subdirectory $@...
# $(MAKE) -C pkg_Platform

clean: $(CLEANSUBDIRS)

Expand Down
30 changes: 18 additions & 12 deletions code/pkg_Platform/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
ROOTDIR = ../../../..
# Makefile

ROOTDIR = ../..
include $(ROOTDIR)/config.mk

CFLAGS_SO += -I$(INCLUDE_DIR)/pkg_Core/Interface
CFLAGS_SO += -I$(INCLUDE_DIR)/pkg_Platform/Interface

all:
$(CC) $(CFLAGS_SO) -c Cx_Example.cpp
$(CC) $(CFLAGS_SO) -c Plugin.cpp
$(CC) $(CFLAGS_SO) -c Module.cpp
$(CC) $(C_FLAGS_SO) -o $(PLUGINS_DIR)/libx3c_swig.so *.o
clean:
rm -rf *.so
rm -rf *.o
SUBDIRS = $(filter-out Interface/, $(sort $(dir $(wildcard */))))
CLEANSUBDIRS = $(addsuffix .clean, $(SUBDIRS))

.PHONY: Modules

Modules:
@echo
@echo Making all in subdirectory $@...
$(MAKE) -C Modules

clean: $(CLEANSUBDIRS)

$(CLEANSUBDIRS):
@cd $(basename $@) ; $(MAKE) clean

1 change: 1 addition & 0 deletions code/pkg_Platform/Modules/x3core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SWIG += -I$(INCLUDE_DIR)/pkg_Core/Interface
SWIG += -outdir $(SWIGOUT_DIR)

all:
-@mkdir $(SWIGOUT_DIR)
$(SWIG) x3core.i
$(CC) $(CFLAGS_SO) -c Module.cpp
$(CC) $(C_FLAGS_SO) -o $(SWIGOUT_DIR)/_x3core$(SWIGOUT_EXT) *.o
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ CFLAGS += -g
C_FLAGS += -Wall -g
CFLAGS_SO = $(CFLAGS) -fPIC
C_FLAGS_SO = $(C_FLAGS) -shared -fPIC
SWIG = swig.exe -c++ -python
SWIG = swig -c++ -python

0 comments on commit a7a7e81

Please sign in to comment.