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.


Avoid strict-aliasing related issues when compiling with optimization
[palacios.git] / symmods / capsule / Makefile
index 9f35bfe..a573104 100644 (file)
@@ -1,12 +1,38 @@
+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
+
+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=$(MOD_TYPE)
+       -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
        cpp -undef $(DEFS) binary.S -o $(MOD_DIR)/.tmp.binary.S
-       gcc $(DEFS) -c $(MOD_DIR)/.tmp.binary.S -o $(MOD_DIR)/$(MOD_NAME).vo
+       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: