Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Minor fix
[palacios.git] / symmods / capsule / Makefile
index ae6acb7..a573104 100644 (file)
@@ -1,14 +1,38 @@
-mod_name := test
-mod_dir := /home/jarusl
-mod_obj := bar.o
-mod_type := 1
+ifeq ($(MOD_TYPE),V3_LINUX_MOD)
+       TYPE_IDX := 1
+else ifeq ($(MOD_TYPE),V3_SYM_MOD)
+       TYPE_IDX := 2
+else ifeq ($(MOD_TYPE),V3_SEC_MOD)
+       TYPE_IDX := 3
+else 
+       TYPE_IDX := 0
+endif
 
-DEFS := -DMOD_NAME=$(mod_name) -DMOD_DIR=$(mod_dir) -DMOD_OBJ=$(mod_obj) -DMOD_TYPE=$(mod_type)
+ifeq ($(MOD_ARCH),i386)
+       ARCH_IDX := 1
+else ifeq ($(MOD_ARCH),x86_64)
+       ARCH_IDX := 2
+else 
+       ARCH_IDX := 0
+endif
 
 
 
+DEFS := -DMOD_NAME=$(MOD_NAME) \
+       -DMOD_DIR=$(MOD_DIR) \
+       -DMOD_OBJ=$(MOD_OBJ) \
+       -DMOD_TYPE=$(TYPE_IDX) \
+       -DMOD_ARCH=$(ARCH_IDX)
+
+
+#      cpp -undef $(DEFS) binary.S -o $(MOD_DIR)/.tmp.binary.S
+#      cpp $(DEFS) $(MOD_DIR)/.tmp.binary.S
+
+CFLAGS := -fno-stack-protector -Wall -O -Werror -fPIC -mno-red-zone
 
 module: FORCE
-       gcc $(DEFS) -c binary.S -o module.vo
+       cpp -undef $(DEFS) binary.S -o $(MOD_DIR)/.tmp.binary.S
+       gcc $(CFLAGS) $(DEFS) -c $(MOD_DIR)/.tmp.binary.S -o $(MOD_DIR)/$(MOD_NAME).vo
+       rm -f $(MOD_DIR)/.tmp.binary.S
 
-FORCE:
\ No newline at end of file
+FORCE: