New Rev D. SOCKit LCD example won't compile due to missing socal.h

I’ve spent some time hunting socal.h on the web, and haven’t seen any reference to this problem yet.
The demo code doesn’t include it. Is this something the FPGA tools auto generate?
Why wouldn’t it be included with the sample code on the CD image?

Ah, found them in the Altera install directory

c:/altera/15/embedded/ip/altera/hps/altera_hps/hwlib/include/soc_a10/socal/socal.h

Now to figure out why the Makefile for the sample code can’t find these.

Aha, the example software Makefile needs updating:

I added:

    ALT_DEVICE_FAMILY ?= soc_cv_av

and I added

 -I${SOCEDS_DEST_ROOT}/ip/altera/hps/altera_hps/hwlib/include/$(ALT_DEVICE_FAMILY)/ -D$(ALT_DEVICE_FAMILY)

to CFLAGS.

Source, but not exactly the same:
http://www.alteraforum.com/forum/showthread.php?t=48706

@GordWait I did what you mentioned but still my make file is not working. It is still displaying the message that hwlib.h no such file or directory. Here is my make file. I shall really appreciate your help because I am stuck with this problem.

#
TARGET = FPGAHPS

#
CROSS_COMPILE = arm-linux-gnueabihf-
ALT_DEVICE_FAMILY ?= soc_cv_av 
CFLAGS := -g $(OFLAG) -Wall -Werror -std=c99 $(MULTILIBFLAGS) -I$(HWLIBS_ROOT)/include -I$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) -D$(ALT_DEVICE_FAMILY) 

ALL_HWLIBS_SRC = $(wildcard $(HWLIBS_ROOT)/src/hwmgr/*.c) $(wildcard $(HWLIBS_ROOT)/src/hwmgr/$(ALT_DEVICE_FAMILY)/*.c $(wildcard $(HWLIBS_ROOT)/src/utils/*.c)) 
LDFLAGS =  -g -Wall  
CC = $(CROSS_COMPILE)gcc
ARCH= arm


build: $(TARGET)
$(TARGET): main.o 
	$(CC) $(LDFLAGS)   $^ -o $@  
%.o : %.c
	$(CC) $(CFLAGS) -c $< -o $@

.PHONY: clean
clean:
	rm -f $(TARGET) *.a *.o *~  

here is my c code:

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h> 
#include <sys/mman.h> 
#include "hwlib.h"
#include "socal/socal.h"
#include "socal/hps.h" 
#include "socal/alt_gpio.h"
#include "hps_0.h"


#define REG_BASE 0xFF200000
#define REG_SPAN 0x00200000

void* virtual_base;
void* led_addr;
void* sw_addr;
int fd;
int switches;

int main (){
fd=open("/dev/mem",(O_RDWR|O_SYNC));
virtual_base=mmap(NULL,REG_SPAN,(PROT_READ|PROT_WRITE),MAP_SHARED,fd,REG_BASE);
sw_addr=virtual_base+SW_BASE;
led_addr=virtual_base+LED_BASE;

while(1){
switches=*(uint32_t *)sw_addr;
*(uint32_t *)led_addr=switches;
usleep(1000000);
printf("%u\n",switches);
}
return 0;
}

Another solution I came across is that you modify the make file as suggested by @GordWait . And then if it still doesn’t work then give the complete path to the socal.h file like C:/altera installation directory /… That will work.